上一页 1 2 3 4 5 6 ··· 18 下一页

新浪微博动态cell的计算总结

摘要: 1.自定义cell 2.在cell中要把显示的控件全部添加上 3.创建Frame模型,这个模型中包含数据模型(Status)@property (nonatomic, strong) PFStatus *status; // 模型;还要包含要显示控件的属性,例如:/**原创微博的整体*/@prope 阅读全文
posted @ 2016-08-10 16:42 哈利波特大 阅读(237) 评论(0) 推荐(0)

iOS 时间戳转化为时间

摘要: NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; [formatter setDateStyle:NSDateFormatterMediumStyle]; [formatter setTimeStyle:NSDateFormatterShortStyle]; [formatter setDateForma... 阅读全文
posted @ 2016-06-22 10:30 哈利波特大 阅读(146) 评论(0) 推荐(0)

iOS 把当前时间转化为时间戳

摘要: + (NSString *)GetNowTimes { NSDate *date = [NSDate dateWithTimeIntervalSinceNow:0]; NSTimeInterval timeInterval = [date timeIntervalSince1970]; NSStri 阅读全文
posted @ 2016-06-22 10:28 哈利波特大 阅读(1318) 评论(0) 推荐(0)

IQKeyboardManager 控制键盘的类库

摘要: 这个库是一个单例,它一旦生效,全项目任何界面都有效。让它生效的代码可以写在任意位置,我写在AppDelegate里。 enable控制整个功能是否启用。 shouldResignOnTouchOutside控制点击背景是否收起键盘。 shouldToolbarUsesTextFieldTintCol 阅读全文
posted @ 2016-06-21 09:35 哈利波特大 阅读(152) 评论(0) 推荐(0)

NSMutableAttributedString 的属性

摘要: 在iOS开发中,常常会有一段文字显示不同的颜色和字体,或者给某几个文字加删除线或下划线的需求。之前在网上找了一些资料,有的是重绘UILabel的textLayer,有的是用html5实现的,都比较麻烦,而且很多UILabel的属性也不起作用了,效果都不理想。后来了解到NSMuttableAttstr 阅读全文
posted @ 2016-06-15 09:37 哈利波特大 阅读(148) 评论(0) 推荐(0)

iOS数组排列

摘要: 1、这个方法可以实现数组的倒叙输出 reverseObjectEnumerator NSArray *array = @[@"1",@"2",@"3",@"4"]; for (NSString *string in [array reverseObjectEnumerator]) { NSLog(@ 阅读全文
posted @ 2016-06-10 17:42 哈利波特大 阅读(343) 评论(0) 推荐(0)

iOS App 启动页

摘要: - (void)showGuiView { // 取得当前版本号 NSString *currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"]; // 沙盒版本号 NSString *la 阅读全文
posted @ 2016-06-08 18:12 哈利波特大 阅读(142) 评论(0) 推荐(0)

iOS 格式化字符串

摘要: 有一串比较大的数字,把这组数字格式化成以万为单位的数字 + (NSString *)stringWithFormatNum:(NSInteger)num { return [NSString stringWithFormat:@"%@", num >= 10000 ? [NSString strin 阅读全文
posted @ 2016-06-05 15:03 哈利波特大 阅读(2092) 评论(0) 推荐(0)

iOS 对数组排序

摘要: NSArray *stringArray = [NSArray arrayWithObjects:@"fff 1", @"abc 21", @"abc 12",@"abc 13",@"abc 05",nil]; NSComparator sortBlock = ^(id string1, id st 阅读全文
posted @ 2016-06-05 10:34 哈利波特大 阅读(182) 评论(0) 推荐(0)

iOS 点击按钮 闪光

摘要: barButton.adjustsImageWhenHighlighted = NO; barButton.showsTouchWhenHighlighted = YES; 阅读全文
posted @ 2016-06-05 09:00 哈利波特大 阅读(215) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 18 下一页