![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
UI常用知识和常见问题
One-way
生活还得继续,学习还需努力!
展开
-
监听滑动条控件Slider值改变
#pragma mark 滑动条slider值改变 - (IBAction)sliderValueChange:(UISlider *)sender { // 1.设置中间的图片 // 获得图片名称 %.f 不保留任何小数 NSString *imageName = [NSString stringWithFormat:@"%.f.png", sender.value]; _i原创 2015-06-28 08:47:50 · 2009 阅读 · 0 评论 -
UIAlertView自动弹框创建步骤
// 1.创建弹框 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"恭喜你" message:@"已通关,敬请期待!" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil]; alert.tag = 100; // 2.显示弹框原创 2015-06-28 08:45:15 · 276 阅读 · 0 评论 -
加载xib自定义View
UIView *customView = [[[NSBundle mainBundle] loadNibNamed:@"customView" owner:nil options:nil] lastObject];原创 2015-06-28 08:38:57 · 295 阅读 · 0 评论 -
UI控件设置圆角
// 巧妙利用控件的尺寸和圆角半径,能产生一个圆(设置圆角90度即可) label.layer.cornerRadius = 5; // 超出主层边界的内容统统剪掉 // label.layer.masksToBounds = YES; label.clipsToBounds = YES; // 等价于上面一句 控件xib设置圆角的方式如图 第一行设原创 2015-06-28 08:26:51 · 307 阅读 · 0 评论 -
Activity Indicator View菊花圈圈,勾选 Hides When Stopped 就无需再设置它是否显示
Activity Indicator View菊花圈圈,勾选 Hides When Stopped 就无需再设置它是否显示原创 2015-06-28 08:20:05 · 392 阅读 · 0 评论 -
创建UIImageView方式的区别
UIImage *image = [UIImage imageWithName:@"timeline_image_gif"]; 这种情况下创建的UIImageView的尺寸跟图片尺寸一样 UIImageView *gifView = [[UIImageView alloc] initWithImage:image]; 这种情况下创建的UIImageView是没有尺寸的原创 2015-06-28 08:17:10 · 251 阅读 · 0 评论 -
UITextView弹簧效果属性
UITextView继承自UIScrollView,垂直方向上拥有有弹簧效果 textView.alwaysBounceVertical = YES; // 垂直方向上拥有有弹簧效果原创 2015-06-28 08:24:05 · 360 阅读 · 0 评论 -
UIPickerView和UIDatePicker常用属性
一.UIPickerView 1.UIPickerView的常见属性 // 数据源(用来告诉UIPickerView有多少列多少行) @property(nonatomic,assign) id dataSource; // 代理(用来告诉UIPickerView每1列的每1行显示什么内容,监听UIPickerView的选择) @property(nonatomic,ass原创 2015-06-28 22:44:25 · 237 阅读 · 0 评论