- 博客(10)
- 收藏
- 关注
原创 hibernate不能自动建表的解决方案
Hibernate: insert into news_table (title, content) values (?, ?) Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not insert: [org.crazyit.app.domain.News] …
2016-05-26 10:44:34 362
原创 Test
Objective-C//// ContactsViewController.m// 01- 私人通讯录//// Created by HiJack on 15/12/10.// Copyright © 2015年 HiJack. All rights reserved.//#import "ContactsViewController.h"#import "Ad
2015-12-17 10:19:31 344
转载 Xcode模拟器路径
。 1、Xcode6模拟器路径的变更 在Xcode5和之前的版本中,Xcode的模拟器路径为:/Users/username/Library/Application Support/iPhone Simulator。 在Xcode6中,将模拟器的位置进行了变更,地址如下:/Users/username/Library/Develop
2015-12-14 17:39:26 1086
原创 数据储存
1. plist储存注意储存以下类型对象(writeToFile: atomically:) 1.1储存 // 1.获取沙盒根路径NSString *path = NSHomeDirectory();// 2.document路径NSString *docPath = [path stringByAppendingPathComponent:@"Documents"];// 3.新建数据NS
2015-12-13 16:30:24 364
转载 更新xcode后插件失效解决方法
控制台运行find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults re
2015-12-11 10:33:01 311
原创 UI控件strong,weak指针的选择
1 直接在storyboard布局控件,或者控制器内用[self.view addSubview:]加入控件. 因为此时UIView对象直接拥有控件, 故控制器控件属性使用weak指针.2 控制器懒加载设置控件(且不使用[self.view addSubview:]) 因为懒加载代码执行完毕后,view并没有指向该控件对象,故需要使用strong指针指向控件,否则懒加载初
2015-12-10 12:10:20 376
原创 初始化NSDate为指定时间(Initialize a NSDate object with a specific time)
方法一:NSString *dateString = @"03-Sep-11";NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];dateFormatter.dateFormat = @"dd-MMM-yy";NSDate *date = [dateFormatter dateFromString:date
2015-12-10 11:59:20 531
原创 数组与字典的应用
一组数据有图片及文字描述 // 设置数组属性@interface@property (nonatomic, strong) NSArray *imageData;@property (nonatomic, assign) int index;@end@implementation // 创建包含 图片名称及描述 的字典 NSMutableDi
2015-10-13 21:42:43 1573
原创 Copy vs Retain in Objective C
NSMutableArray *array = [[NSMutableArray alloc]initWithObjects:@"First",@"Second", nil]; NSMutableArray *copiedArray = [array mutableCopy]; NSMutableArray *retainedArray = [array retain];
2015-09-23 22:53:05 286
原创 UIAlertController
// 创建UIAlertControlller对象(设置标题,内容,显示风格为Alert或ActionSheet)UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My Alert"
2015-09-09 19:20:49 257
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人