1,ios6屏幕旋转,所有被push出来的controller的旋转属性都由root controller中以下函数- (NSInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskAll;}- (BOOL)...
分类:
其他好文 时间:
2014-08-15 19:24:39
阅读次数:
254
IOS屏幕自动旋转,强制横竖屏方法:- (BOOL)shouldAutorotate{ return YES;}- (NSUInteger)supportedInterfaceOrientations{ return (UIInterfaceOrientationMaskAll);// ...
分类:
移动开发 时间:
2014-08-15 19:19:09
阅读次数:
775
1.方法与顺序无关
2.枚举绑定数据类型
enum {
ObjectiveC,
Java,
Ruby,
Python,
Erlang
};
typedef NSUInteger Language;
...
分类:
其他好文 时间:
2014-08-14 01:37:17
阅读次数:
220
1.设置section的数目,即是你有多少个cell
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 3; // in your case, there are 3 cells
}
2.对于每个section返回一个cell
- (NSInteger)tableView:(UI...
分类:
移动开发 时间:
2014-08-12 22:08:04
阅读次数:
309
NSDataNSStringNSNumberNSDateNSArrayNSDictionary*如果你想保存其他类型,如UIImage,你应该进行编码(即archive),或者将它转换为NSData、NSNumber或者NSString。
分类:
其他好文 时间:
2014-08-12 18:13:54
阅读次数:
207
//在.h文件里
{
NSInteger_numerator;//分子
NSInteger_denominator;//分母
}
//属性
@property(nonatomic)NSIntegernumerator;
@property(nonatomic)NSIntegerdenominator;
//初始化
-(id)initwithNumerator:(NSInteger)numeratordenominator:(NSInteger)denominator;
//..
分类:
其他好文 时间:
2014-08-12 03:32:14
阅读次数:
144
@font-face{font-family:"宋体";}@font-face{font-family:"宋体";}@font-face{font-family:"@宋体";}@font-face{font-family:"Cambria";}@font-face{font-family:"HeitiSCLight";}@font-face{font-family:"@HeitiSCLight";}@font-face{font-family:"MenloRegular";}p.MsoNormal..
分类:
其他好文 时间:
2014-08-08 02:09:35
阅读次数:
252
NSUserDefaults可以存储NSString,NSNumber, NSDate, NSArray, NSDictionary,自定义类可以通过NSData的方式进行存储,当然要实现NSCoding这个protocol才 行,NSObject1. 系统会保存到该应用下的/Library/Pre...
分类:
其他好文 时间:
2014-08-07 12:41:09
阅读次数:
200
过去写iphone程序一直都没有用过自动解析,都是手动按着字典一层一层的解析,这样费时费力,还容易出错。后来公司来了新朋友带来了自动解析的jastor库,着实不错。
简单介绍一下jastor
jastor是一个基于oc运行时的库,它可以将字典对象转换成NSObject对象。它支持NSString, NSNumber,NSArray, NSDictionary以及它们的嵌套类型。例如现在需要将d...
分类:
其他好文 时间:
2014-08-06 19:27:42
阅读次数:
256
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{ UIImagePickerController * picker = [[UIImagePickerControl...
分类:
移动开发 时间:
2014-08-05 13:29:29
阅读次数:
229