摘要: 1 UIActivityIndicatorView *av = [[UIActivityIndicatorView alloc] init]; // 活动图标 2 av.frame = CGRectMake(0, 0, 50, 50); 3 av.center = self.view.center; 4 av.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhite; // 白色样式 5 av.activityIndicatorViewStyle = UIActivityIndi... 阅读全文
posted @ 2013-02-05 16:13 diablo大王 阅读(308) 评论(0) 推荐(0) 编辑
摘要: <UIPickerViewDataSource,UIPickerViewDelegate> 实现这二个协议 1 UIPickerView *pv = [[UIPickerView alloc] init]; 2 pv.delegate = self; 3 pv.dataSource = self; 4 pv.showsSelectionIndicator = YES; // 是否显示选择标示 5 6 -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ 7 ... 阅读全文
posted @ 2013-02-05 16:06 diablo大王 阅读(967) 评论(0) 推荐(0) 编辑
摘要: 1 UIDatePicker *dp = [[UIDatePicker alloc] init]; 2 [dp setDate:[NSDate date] animated:YES]; // 设置日期控件值 3 [dp addTarget:self 4 action:@selector(dateValueChange:) 5 forControlEvents:UIControlEventValueChanged]; // 时间改变时触发此事件 6 7 NSDateFormatter *form = [[NSDateFormat... 阅读全文
posted @ 2013-02-05 15:51 diablo大王 阅读(2475) 评论(0) 推荐(0) 编辑
摘要: 1 UISlider *sl = [[UISlider alloc] init]; // 初始化滑块 2 sl.minimumValue = 0; // 最大值 3 sl.maximumValue = 1; // 最小值 4 sl.value = 0.5f; // 当前值 5 6 sl.minimumValueImage = [UIImage imageNamed:@"minImage.png"]; // 最小值一侧图标 7 sl.maximumValueImage = [UIImage imageNamed:... 阅读全文
posted @ 2013-02-05 15:33 diablo大王 阅读(715) 评论(0) 推荐(0) 编辑
摘要: 1、定义协议UIViewPassValueDelegate.h1 #import <Foundation/Foundation.h>2 3 @protocol UIViewPassValueDelegate <NSObject>4 -(void)passValue:(NSString *)value1;5 @end2、A视图定义 1 #import "UIViewPassValueDelegate.h" 2 3 @interface AViewController : UIViewController<UIViewPassValueDelega 阅读全文
posted @ 2013-02-05 10:48 diablo大王 阅读(2707) 评论(0) 推荐(0) 编辑