代码改变世界

创建纯洁的TableViewCell

2015-10-06 09:27 by Y了个J, 169 阅读, 0 推荐, 收藏, 编辑
摘要:-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ // 声明静态字符串型对象,用来标记重用单元格 static NSString *str... 阅读全文

从gitlab下载好cocoapods中遇到的问题

2015-09-26 16:19 by Y了个J, 410 阅读, 0 推荐, 收藏, 编辑
摘要:如果遇到[!] Unable to satisfy the following requirements:- `Mantle (~> 2.0.3)` required by `Podfile`- `Mantle (= 2.0.3)` required by `Podfile.lock`某个类无法更新... 阅读全文

tableview隐藏多余分割线

2015-09-22 16:48 by Y了个J, 148 阅读, 0 推荐, 收藏, 编辑
摘要:- (void)setExtraCellLineHidden: (UITableView *)tableView{ UIView *view =[ [UIView alloc]init]; view.backgroundColor = [UIColor clearColor]; [tab... 阅读全文

UIBarButtonItem变弹簧

2015-09-22 14:33 by Y了个J, 198 阅读, 0 推荐, 收藏, 编辑
摘要:UIBarButtonItem* spaceItem = [[UIBarButtonItemalloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpacetarget:selfaction:nil] 阅读全文

Dictionary中的结构体转出来

2015-09-17 10:55 by Y了个J, 272 阅读, 0 推荐, 收藏, 编辑
摘要:CGRect keyBoardFrame = [note.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; 阅读全文

tableviewcell不允许点击

2015-09-16 18:00 by Y了个J, 207 阅读, 0 推荐, 收藏, 编辑
摘要:cell的allowsSelection 选择为no 阅读全文

CGRect 结构体的另外一种写法

2015-09-16 11:16 by Y了个J, 473 阅读, 0 推荐, 收藏, 编辑
摘要:// _textF = CGRectMake(textX, textY, textSize.width, textSize.height); _textF = (CGRect){{textX, textY}, textSize}; 阅读全文

计算文字尺寸

2015-09-16 10:43 by Y了个J, 270 阅读, 0 推荐, 收藏, 编辑
摘要:/*** 计算文字尺寸** @param text 需要计算尺寸的文字* @param font 文字的字体* @param maxSize 文字的最大尺寸*/- (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxSize:... 阅读全文

一般枚举类型

2015-09-16 10:42 by Y了个J, 136 阅读, 0 推荐, 收藏, 编辑
摘要:typedef enum { MJMessageTypeMe = 0, // 自己发的 MJMessageTypeOther // 别人发的} MJMessageType; 阅读全文

typedef NS_OPTIONS 位移的枚举

2015-09-09 16:02 by Y了个J, 155 阅读, 0 推荐, 收藏, 编辑
摘要:typedef NS_OPTIONS里面的枚举可以并存使用 用 | 来并存 阅读全文
上一页 1 ··· 3 4 5 6 7 8 9 下一页