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

2017年1月14日

摘要: UIEvent是什么代表iOS系统中的一个事件。UIEvent分为三类,touch events, motion events, and remote-control eventstouch events每一个event包含多个UITouch对象。每一个event有时间戳(timestamp),可以依靠它来区分不同的event。在event的多个阶段,系统保证event是相同的。用户不应该reta... 阅读全文
posted @ 2017-01-14 08:45 花老🐯 阅读(135) 评论(0) 推荐(0) 编辑
摘要: image的伸缩变换最好是image和imageview的size一致。如果不一致,最终的效果由imageView的contentMode和image的属性共同决定。如果image没有cap insets,那么图片的表现完全由imageview的contentMode决定。如果image有cap insets,cap insets决定图片的各个部分的伸缩方向。图片的透明度图片的透明度由image的... 阅读全文
posted @ 2017-01-14 08:45 花老🐯 阅读(110) 评论(0) 推荐(0) 编辑
摘要: UIControl继承自UIViewUIControl与Target-Action模式使用addTarget:action:forControlEvents方法来设置某一个controlEvent对应的方法(action)及要相应这个事件的target。target一般是包含uicontrol的rootview对应的vc。action有以下三种类型。其中sender对应uicontrol,even... 阅读全文
posted @ 2017-01-14 08:44 花老🐯 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 原文链接sizeToFit()和sizeThatFits(_:)sizeToFit()会调用sizeThatFits(_:)方法,将现在的frame作为参数。然后根据函数返回的结果更新view。sizeToFit will simply call through to sizeThatFits: passing the view's current size as the argument. It... 阅读全文
posted @ 2017-01-14 08:35 花老🐯 阅读(285) 评论(0) 推荐(0) 编辑
摘要: coverVertical(默认的)flipHorizontalcrossDissolvepartialCurl 阅读全文
posted @ 2017-01-14 08:33 花老🐯 阅读(208) 评论(0) 推荐(0) 编辑
摘要: iOS的键盘有几个通知UIKeyboardWillShowNotificationUIKeyboardDidShowNotificationUIKeyboardWillHideNotificationUIKeyboardDidHideNotification每一个通知的具体内容是什么呢UIKeyboardAnimationCurveUserInfoKey = 7;UIKeyboardAnimati... 阅读全文
posted @ 2017-01-14 08:32 花老🐯 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Setting this property to true causes the receiver to block the delivery of touch events to other views in the same window. The default value of this property is false.就是说如果两个view被同时点击,那么只有一个会得到相应。因为其他... 阅读全文
posted @ 2017-01-14 08:31 花老🐯 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 原文链接在很多编程语言中都有resizable image这样的概念,比如android中的NinePatch graphic ,css3中的border image,微软的Nine-Grid Rendering,还有就是iOS中UIImage的resizable image。123456789可以将resizable image分成9部分,通过它生成大图片的时候遵循以下规则:四个角(1,3,7,... 阅读全文
posted @ 2017-01-14 08:30 花老🐯 阅读(637) 评论(0) 推荐(0) 编辑
摘要: NSString *lang = [self.inputTextField.textInputMode primaryLanguage]; // 键盘输入模式 if ([lang isEqualToString:@"zh-Hans"]) { // 简体中文输入,包括简体拼音,健体五笔,简体手写 UITextRange *selectedRange = [self.... 阅读全文
posted @ 2017-01-14 08:29 花老🐯 阅读(150) 评论(0) 推荐(0) 编辑
摘要: UIImage是什么用来管理APP里的图片资源,可以用来表示设备支持的图片资源,不仅仅是jpg和png。UIImage是immutable的,因此也是线程安全的。iOS支持的所有的图片格式链接不过,对于gif格式,只能展示第一帧。需要把gif分成若干帧,分别展示。iOS本身的图片缓存系统iOS本身有一个图像缓存系统。系统在内存不够使,会清除缓存中的一些内容。使用init(named:in:comp... 阅读全文
posted @ 2017-01-14 08:28 花老🐯 阅读(478) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 30 下一页

导航