摘要: 前面iOS学习之UIPickerView控件的简单使用用到的UIPickerView弹出来是通过 textField.inputView = selectPicker; textField.inputAccessoryView = doneToolbar; 这中方法来做的。如果UIPickerView或UIDatePicker控件通过其他按钮或事件激活的时候怎么能像系统那样弹出来呢?为了实现这个需求,就要用到动画效果了。1、新建一个Single View App项目,在.xib文件中添加控件如下:两个button,一个UIDatePicker。2、创建xib和ViewController的连. 阅读全文
posted @ 2014-03-27 14:48 haotianling 阅读(662) 评论(0) 推荐(0) 编辑
摘要: 在Xcode中,Debug时,不能像eclipse,或VS那些集成开发那样,能直接查看变量的值。那怎么在调试的时候查看XCode的变量呢?有一些方法的。1、新建一个Single View App在viewDidLoad里添加些代码:- (void)viewDidLoad{ [super viewDidLoad]; NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@"value1",@"key1", @"28", @"age",@" 阅读全文
posted @ 2014-03-27 14:24 haotianling 阅读(193) 评论(0) 推荐(0) 编辑
摘要: iOS上使用地图比Android要方便,只需要新建一个MKMapView,addSubView即可。这次要实现的效果如下:有标注(大头针),定位,地图。1、添加地图1.1 新一个Single View app ,选择默认项,创建后,在ViewController.h[cpp]view plaincopy#import#import#import@interfaceViewController:UIViewController{MKMapView*map;CLLocationManager*locationManager;}@end1.2在ViewController.m中添加[cpp]view 阅读全文
posted @ 2014-03-27 10:34 haotianling 阅读(262) 评论(0) 推荐(0) 编辑