04 2016 档案
摘要:在iOS开发过程中,不管是做什么应用,都会碰到数据保存的问题。将数据保存到本地,能够让程序的运行更加流畅,不会出现让人厌恶的菊花形状,使得用户体验更好。下面介绍一下数据保存的方式: 1.NSKeyedArchiver:采用归档的形式来保存数据,该数据对象需要遵守NSCoding协议,并且该对象对应的
阅读全文
摘要:首先,UIControlEvents有这个几种: UIControlEventTouchDown = 1 << 0, // on all touch downs UIControlEventTouchDownRepeat = 1 << 1, // on multiple touchdowns (ta
阅读全文
摘要:如果导航控制器的BarButtonItem属性是一致的,可以重写initialize方法用来设置主题 也可以一次性设置leftBarButtonItem和rightBarButtonItem 重写 - (void)pushViewController:(UIViewController *)view
阅读全文
摘要:self.window = [[UIWindow alloc] init]; self.window.frame = [UIScreen mainScreen].bounds; oneViewController *oneview = [[oneViewController alloc] init]; //设置tabbarItem的图片并且设置渲染模式为UIImag...
阅读全文
摘要:scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)]; scrollView.backgroundColor = [UIColor redColor]; // 是否支持滑动最顶端 // scrollV
阅读全文
摘要://根据文字获取size - (CGSize)getSizeWithstring:(NSString *)string { CGSize maxSize = CGSizeMake(320, 320); NSDictionary *dict = @{NSFontAttributeName : [UIF
阅读全文

浙公网安备 33010602011771号