上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 30 下一页

2017年1月14日

摘要: allowsEditingTextAttributes属性默认是false,既不能编辑。如果设置为true,上下文菜单会有编辑文字属性选项。UITextBorderStyle roundedRect这种情况下,背景图被忽略了bezellinenoneleftview, rightviewleftview可以设置textfiled的leftview、leftViewMode来设置图片和显示的时机。l... 阅读全文
posted @ 2017-01-14 09:58 花老🐯 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 默认的四种cell的类型原网站还有这个带图的据我自己试验,只有value2不自带imageview不同的accessoryType可以看到,一个tabelviewcell的contentview被缩短了。右边是显示附件的view。设置accessoryViewcontentView也变短了,此时设置的accessoryType没用了。accessoryView的大小也会影响到contentview... 阅读全文
posted @ 2017-01-14 09:57 花老🐯 阅读(227) 评论(0) 推荐(0) 编辑
摘要: UITableViewRowAction类object defines a single action to present when the user swipes horizontally in a table类的属性style: UITableViewRowActionStyle按钮的style,default和normal效果如上图title: String?按钮的标题啦backgroun... 阅读全文
posted @ 2017-01-14 09:55 花老🐯 阅读(168) 评论(0) 推荐(0) 编辑
摘要: UITableView有两种模式,普通模式和编辑模式。在编辑模式下可以对cell进行排序、删除、插入等等。如何进入编辑模式调用tableView的setEditing(editing: Bool, animated: Bool)方法。进入编辑模式以后发生了什么向每个cell发送setEditing:animated:方法进入编辑模式以后cell的变化普通模式下cell的contentview的bo... 阅读全文
posted @ 2017-01-14 09:50 花老🐯 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 删除的效果 AutomaticBottomFadeleftmiddlenonerighttop 简单删除先删除数据源里的数据,然后再删除cell,否者会报错 let indexPath = NSIndexPath.init(forRow: 1, inSection: 0) let indexPath1 = NSIndexPath.init(forRow: 3, inSection... 阅读全文
posted @ 2017-01-14 09:32 花老🐯 阅读(225) 评论(0) 推荐(0) 编辑
摘要: viewControllersUIViewController的数组,即要显示的VC,数组中VC的顺序即是实际展示的VC的顺序。UITabBarController最多展示5个tab,如果数组中的元素的个数超过了5个,会正常展示前四个tab,然后有一个更多的tab,可以选择其他的tab。customizableViewControllers点击更多时,会有编辑按钮,然后用户可以对这些tab排序。此... 阅读全文
posted @ 2017-01-14 09:08 花老🐯 阅读(268) 评论(0) 推荐(0) 编辑
摘要: UIScrollView必须知道它的contentsize这就是为啥TableView的row的height必须被计算,即使那些row还没有出现在屏幕。The scroll view must know the size of the content view so it knows when to stop scrolling; by default, it “bounces” back whe... 阅读全文
posted @ 2017-01-14 09:05 花老🐯 阅读(416) 评论(0) 推荐(0) 编辑
摘要: UIScreen 和UIWindowUIScreen object defines the properties associated with a hardware-based display 就是说UIScreen是硬件显示器的软件表示。通过UIScreen来获取和设置对应显示器的属性。一个设备可以有一个主屏幕和若干附属屏幕(attached screens)。A UIWindow obje... 阅读全文
posted @ 2017-01-14 09:00 花老🐯 阅读(406) 评论(0) 推荐(0) 编辑
摘要: UIResponder是什么可以响应UIEvent的类,是UIApplication, UIView及UIViewController的父类。它的父类是NSObject管理第一响应者。是否是第一响应者func isFirstResponder() -> Bool成为第一响应者func becomeFirstResponder() -> Bool。只有当前的第一响应者可以放弃成为第一响应者,且这个U... 阅读全文
posted @ 2017-01-14 08:53 花老🐯 阅读(167) 评论(0) 推荐(0) 编辑
摘要: UINavigationController管理一个VC的栈,栈底的VC叫做这个UINavigationController的root view controller. 有一个函数叫做popToRootViewController(animated:),就是返回rootVC。UINavigationController在顶部有一个navigationBar,继承自UIView。它的frame,bo... 阅读全文
posted @ 2017-01-14 08:51 花老🐯 阅读(237) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 30 下一页

导航