对于习惯了OC代码的程序员来说,swift的语法简直让人不能忍受,今天将一些常用的UI控件简单做了一下整理。import UIKitclass ViewController : UIViewController, UIPickerViewDataSource, UIPickerViewDelegat...
分类:
编程语言 时间:
2016-01-06 00:13:08
阅读次数:
658
1.效果如下:2.UINavigationController,导航控制器也是UIViewController的子类(1)在Appdelegate.h中 设置UIWindow及其根控制器为导航控制器,代码如下:- (BOOL)application:(UIApplication *)applicat...
分类:
其他好文 时间:
2016-01-04 23:49:09
阅读次数:
176
1.导入系统框架/*** 界面效果1 实现定位到输入的地址,并且提示出地址的经纬度*/ 2.viewcontroller.h#import #import @interface ViewController : UIViewController@property (strong, nonatomic...
分类:
其他好文 时间:
2016-01-02 22:34:58
阅读次数:
345
ViewController.h#import @interface ViewController : UIViewController//如果想让list成为一个可变的数组,需要把copy变成retain,因为copy之后的对象永远都只是一个不可变的对象@property (nonatomic,c...
分类:
其他好文 时间:
2015-12-29 17:41:29
阅读次数:
244
import UIKitclass ViewController: UIViewController,UITableViewDelegate,UITableViewDataSource{ override func viewDidLoad() { super.viewDidLoa...
分类:
编程语言 时间:
2015-12-29 12:48:27
阅读次数:
277
import UIKitclass ViewController: UIViewController { @IBOutlet weak var wc: UIWebView! override func viewDidLoad() { super.viewDidLoad() let url = NSU...
分类:
移动开发 时间:
2015-12-29 12:27:27
阅读次数:
154
触摸响应者对象在iOS中不是任何对象都能处理事件,只有继承了UIResponder的对象才能接收并处理事件.我们称之为"响应者对象".UIApplication,UIViewController,UIView都继承自UIResponder,因此它们都是响应者对象,都能够接收并处理事件.UIView?...
分类:
移动开发 时间:
2015-12-26 13:28:14
阅读次数:
277
- (UIViewController *)findViewController:(UIView *)sourceView{ id target=sourceView; while (target) { target = ((UIResponder ...
分类:
移动开发 时间:
2015-12-24 10:37:40
阅读次数:
168
iOS 6的rotation 官方的描述http://www.bgr.com/2012/08/06/ios-6-beta-4-change-log-now-available/知识点:*UIViewController的shouldAutorotateToInterfaceOrientation方法...
分类:
移动开发 时间:
2015-12-23 19:29:48
阅读次数:
219
不知大家有没有遇见过自己写的tableview被导航栏遮挡住的问题,反正我是遇见过!因为在ios7以后所有的UIViewController创建后默认就是full Screen的,因此如果带导航栏的应用界面中的部分控件会被导航栏覆盖掉。解决方案:可以使用ios7中的UIViewController新...
分类:
移动开发 时间:
2015-12-23 11:00:30
阅读次数:
293