UI
guofeifei1017
这个作者很懒,什么都没留下…
展开
-
UILable上如何添加背景图片
//活动图片 UILabel *activitylcon = [[UILabel alloc] initWithFrame:CGRectMake(10, 100, 80, 99)]; activitylcon.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"tupian原创 2015-11-20 18:00:53 · 608 阅读 · 0 评论 -
如何设置editButtonItem编辑 完再次点击编辑完成
1.添加编辑按钮self.navigationItem.rightBarButtonItem = self.editButtonItem; self.navigationItem.rightBarButtonItem.title = @"编辑";2.//tableView处于可编辑状态 - (void)setEditing:(BOOL)editing animated:(原创 2015-12-10 11:27:07 · 750 阅读 · 0 评论 -
设置NSTimer限制ImageView图片显示时间
//创建一个UIimageView UIImage *image1 = [UIImage imageNamed:@"weixin.png"]; self.imageView1 = [[UIImageView alloc] initWithImage:image1]; [self.window addSubview:self.imageView1]原创 2015-12-10 17:23:56 · 533 阅读 · 0 评论 -
如何将一个浮点型转化为字符串型
stringWithFormat这是一个将滑动器的数值显示在一个Lable上的方法self.slider.value是获取滑动器的数值,是一个float型数值,转化成字符串 - (void)sliderTapAction:(UISlider *)slider{ self.lable.text = [NSString stringWithFormat:@"%f", se原创 2015-11-25 19:20:26 · 2436 阅读 · 0 评论 -
网络获取数据如何显示到cell上
ControllerView .h#import @interface ThreeViewController : UIViewController@endControllView.m#import "ThreeViewController.h"#import "ThreeTableViewCell.h"#import "ThreeModel.h"原创 2015-12-31 09:01:03 · 1316 阅读 · 0 评论 -
自定义cell中的按钮点击事件
1.在自定义cell中定义一个button,在 cellForRowAtIndexPath写出点击方法 [cell.button addTarget:self action:@selector(classAction:event:) forControlEvents:UIControlEventTouchUpInside];2.实现classAction:event原创 2016-04-09 13:55:50 · 453 阅读 · 0 评论 -
for循环创建UIButton,如何去修改边框颜色
看一下效果图,类似于淘宝加入购物车,我用的是UIButton颜色颜色Button和型号一样:1.创建UIButtonfor (int i = 0; i self.selectColorBtn = [UIButton buttonWithType:UIButtonTypeCustom]; if (i > 4) { sel原创 2016-06-06 15:10:09 · 332 阅读 · 0 评论 -
UItableView 与 tableFooterView中间多出一部分
UItableView 与 tableFooterView中间多出一部分, 蓝色为UItableView, 红色部分为tableFooterView,但是中间多出的部分还没有搞清楚原因在与:初始化UItableView使用的是:UITableViewStyleGroupedtableView = [[UITableView alloc] initWithFrame:CGRectMake原创 2016-09-29 17:33:11 · 1718 阅读 · 0 评论