摘要: NSArray *windows = [[UIApplication sharedApplication] windows]; if ([windows lastObject] != warningAlertView) { [[windows lastObject] addSubview:warni 阅读全文
posted @ 2017-07-03 19:09 半掩纱窗 阅读(248) 评论(0) 推荐(0) 编辑
摘要: .stack view只能用于布局,无法接受到用户交互,没有找到好方法 阅读全文
posted @ 2017-05-10 16:20 半掩纱窗 阅读(372) 评论(0) 推荐(0) 编辑
摘要: iOS8新增api,重写下2个代理方法 func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { return true } func tableView(_ tableView: UI 阅读全文
posted @ 2017-05-10 16:17 半掩纱窗 阅读(410) 评论(0) 推荐(0) 编辑
摘要: iOS10变更 Using "App-Prefs:root" instead of "prefs:root" 阅读全文
posted @ 2017-04-13 12:03 半掩纱窗 阅读(323) 评论(0) 推荐(0) 编辑
摘要: let imagePicker = UIImagePickerController() imagePicker.navigationBar.isTranslucent = false //导航栏颜色 imagePicker.navigationBar.barTintColor = AppColor. 阅读全文
posted @ 2017-04-12 15:08 半掩纱窗 阅读(610) 评论(0) 推荐(0) 编辑
摘要: 在viewDidLoad()中调用 addHeaderView()给我的tableview增加表头 fileprivate let HeaderViewHeight : CGFloat = 230 奇怪的事情出现在这,在iPhone7,6等设备上显示正常,在7plus,SE上,headerView明 阅读全文
posted @ 2017-04-11 20:34 半掩纱窗 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1. 分解storyBoard时,出现多个referance 选中导航控制器的所有控制器 > editor > Refactor to storyBoard ,命名 ,然后出来类似下图的情况。 原因:在inspector中设置了 storyboard id。 阅读全文
posted @ 2017-03-30 16:58 半掩纱窗 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 滚回顶部: self.tableView.setContentOffset(CGPointZero, animated: true) 之前一直觉得是 scrollsToTop 属性,这个属性是点击状态栏返回顶部,默认是true 阅读全文
posted @ 2016-06-14 15:00 半掩纱窗 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 以2为小数输出float a = 1.234567 在oc中可以借助NSLog格式输出 NSLog(@"float:%.2f",a); // 输出: // double:1.23 在SWIFT中,String 的格式化初始方法可以帮助我们利用格式化的字符串: let format = String( 阅读全文
posted @ 2016-05-06 10:07 半掩纱窗 阅读(1758) 评论(0) 推荐(0) 编辑
摘要: let alertTitle = "TITLE" let alertMessage = "MESSAGE" let alertOkButtonText = "确定" let alterCancelButtonText = "取消" let alertController... 阅读全文
posted @ 2016-04-01 10:51 半掩纱窗 阅读(190) 评论(0) 推荐(0) 编辑