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

2017年1月14日

摘要: 当一个VC把另一个VC作为子view加到自己的view时,一定要先调用addChildViewController(_:)方法。因为一个VC的root view,也就是VC的view只能被这个VC持有。addSubView时,子VC的view会被父VC持有,违法了这个原则。所以要先建立两个VC之间的父子关系。Each view controller object is the sole owner... 阅读全文
posted @ 2017-01-14 10:18 花老🐯 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 图片很小,frame很大 图片很大,frame很小 UIViewContentModeScaleToFill, UIViewContentModeScaleAspectFit,UIViewContentModeScaleAspectFill,UIViewContentModeRedraw,UIViewContentModeCenter,UIViewContentModeTop,UIViewC... 阅读全文
posted @ 2017-01-14 10:16 花老🐯 阅读(299) 评论(0) 推荐(0) 编辑
摘要: tintColor每一个view都有一个tintcolor,类似于魔法色,实现类似于换肤的效果。每一个view的subview都集成view的tintcolor,当然subview可以指定自己的tintcolor如果不指定的话,默认为blue对于tabBar,不指定tintColor的话,效果如下:如果指定了tintColor为黄色,效果如下:self.tabBar.tintColor = UIC... 阅读全文
posted @ 2017-01-14 10:15 花老🐯 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 分享链接 阅读全文
posted @ 2017-01-14 10:13 花老🐯 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Changes to several view properties can be animated—that is, changing the property creates an animation that conveys the change to the user over a short period of time. The UIView class does most of th... 阅读全文
posted @ 2017-01-14 10:13 花老🐯 阅读(220) 评论(0) 推荐(0) 编辑
摘要: UITouch是什么表示在在屏幕上触摸事件,包括触摸的位置、大小、力度(3D touch)、运动。在一系列触摸事件中,UITouch都是同一个,但是不要retain某一个UITouch。如果要保存信息,从UITouch中拷贝出来,保存。每一个touch事件都有一个事件戳touch事件可以得到用户手指点击(tap)屏幕的次数。var tapCount: Int { get }。可以用来用来确定用户是... 阅读全文
posted @ 2017-01-14 10:12 花老🐯 阅读(137) 评论(0) 推荐(0) 编辑
摘要: UITextView继承自UIScrollViewUITextView可以展示多行文字控制上下左右缩进 myTextField.textContainerInset = UIEdgeInsetsMake(10, 30, 10, 20)滑动使某区域文字可见 //移动到最前面 self.myTextView.scrollRangeToVisible(NSMakeRan... 阅读全文
posted @ 2017-01-14 10:11 花老🐯 阅读(105) 评论(0) 推荐(0) 编辑
摘要: An instance of the UITextInputMode class represents the current text-input mode. You can use this object to determine the primary language currently being used for text input. 既表示当前文本输入模式的一个类,可以用它来确定... 阅读全文
posted @ 2017-01-14 10:09 花老🐯 阅读(253) 评论(0) 推荐(0) 编辑
摘要: UItextInput是一个protocol,一般来说,文字处理的控件都要遵守这个协议。如UITextField,UITextView。下面介绍一些文字处理的基本概念。 marked text对于多步骤(multistage)的文字输入来说,有一些文字是已经输入在文本框里,却还没有点击确认,这些文字叫做marked text。中文有,日文也比较常见。UITextPosition和UITextRa... 阅读全文
posted @ 2017-01-14 10:08 花老🐯 阅读(579) 评论(0) 推荐(0) 编辑
摘要: 成为第一响应者之前,调用delegate的textFieldShouldBeginEditing(_:)方法成为第一响应者发送通知UIKeyboardWillShow和UIKeyboardDidShow调用textFieldDidBeginEditing(_:)。 发送UITextFieldTextDidBeginEditing通知处于编辑态输入文字改变(包括marked text),调用text... 阅读全文
posted @ 2017-01-14 10:06 花老🐯 阅读(132) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页

导航