摘要:
相关设置如图所示,图一——>图二——>图三图一图二图三- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override... 阅读全文
摘要:
使用广播通知,在viewWillAppear时注册键盘打开和关闭的事件监听,在viewWilldisappear时解除键盘打开和关闭的事件监听。请注意viewWillAppear和viewWilldisappears事件触发的时机。 在ViewController.m中添加如下四个方法。-(v... 阅读全文
摘要:
#pragma mark - 点击选择按钮-(void)selectedButtonClicked:(UIButton * )sender{ if (tempButton == nil){ sender.selected = YES; tempButton = se... 阅读全文
摘要:
NSString * key = (__bridge NSString *) kCFBundleVersionKey; /// 当前软件的版本号 NSString * currentVersion = [NSBundle mainBundle].infoDictionary[key]; ... 阅读全文
摘要:
首先两个方法都是异步执行。layoutSubviews方便数据计算,drawRect方便视图重绘。layoutSubviews在以下情况下会被调用:1、init初始化不会触发layoutSubviews。2、addSubview会触发layoutSubviews。3、设置view的Frame会触发l... 阅读全文
摘要:
#pragma mark- 返回一张自由拉伸的图片+ (UIImage *)resizableImage:(NSString *)name{ UIImage *image = [self imageWithName:name]; CGFloat left = image.size.width *... 阅读全文
摘要:
self.chineseSubtitleLabel.adjustsFontSizeToFitWidth = YES; 阅读全文
摘要:
NSString *nameString = self.dataArray[indexPath.row][@"user"]; NSDictionary *nameLabelAttr=@{NSFontAttributeName:LLShowMessageNameFont}; //// ... 阅读全文
摘要:
mainTableView.sectionIndexBackgroundColor = [UIColor greenColor];//修改右边索引的背景色// mainTableView.sectionIndexColor = [UIColor orangeColor];//修改右边索引字体的... 阅读全文
摘要:
tableview的分割线左对齐 在viewDidLoad方法中加上如下代码: if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {[self.tableView setSeparatorInset:UIEd... 阅读全文