![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
UI
文章平均质量分 63
_snake
这个作者很懒,什么都没留下…
展开
-
修改presentViewController弹出界面的大小
PresentViewController弹出的界面,有四种模式,分别是: UIModalPresentationFullScreen代表弹出VC时,presented VC充满全屏,如果弹出VC的wantsFullScreenLayout设置为YES的,则会填充到状态栏下边,否则不会填充到状态栏之下。 UIModalPresentationPageSheet代表弹出是弹出VC时,pr转载 2015-02-04 16:41:39 · 2506 阅读 · 0 评论 -
UITableView 添加长按手势UILongPressGestureRecognizer
给UITableView 添加长按手势,识别长按哪一行。 长按手势类UILongPressGestureRecognizer, 属性minimumPressDuration表示最短长按的时间 添加手势代码: UILongPressGestureRecognizer * longPressGr = [[UILongPressGestureRec原创 2015-03-03 16:32:22 · 734 阅读 · 0 评论 -
如何在 iOS 7 获得导航栏上的模糊和半透明效果?
问题 我的应用程序出现,要订的正确,但我不能达到模糊的半透明效果的 iOS 7 是著名的。矿井显示为不透明。 预期的效果 我想获得更明显的模糊效果,如苹果的拖车 app: 半透明 在我的 UINavigationController 的子类,我使导航栏半透明: - (id)initWithRootViewController:(UIViewContr转载 2015-05-06 15:01:35 · 1088 阅读 · 0 评论 -
适配遇到的一些问题
1、如果设置了self.navigationController.navigationBar 设置了UIBarMetricsLandscapePhone的背景;而没有设置UIBarMetricsDefault的背景,navigationBar会变透明 如图所示: navigationBar透明 2、上图还出现了一个问题,如果没有设置self.automaticallyAdjust转载 2015-05-06 14:14:10 · 890 阅读 · 0 评论 -
适配遇到的一些问题
1、如果设置了self.navigationController.navigationBar 设置了UIBarMetricsLandscapePhone的背景;而没有设置UIBarMetricsDefault的背景,navigationBar会变透明 如图所示: navigationBar透明 2、上图还出现了一个问题,如果没有设置self.automaticallyAdjust转载 2015-05-06 14:11:52 · 432 阅读 · 0 评论 -
ios监听音量按键
这个很简单,KVO监听AVAudioSession单例的outputVolume属性值就可以了 [[AVAudioSession sharedInstance] addObserver:self forKeyPath:@"outputVolume" options:NSKeyValueObservingOptionNew | NSKeyValueObservingO原创 2015-06-02 14:24:06 · 1503 阅读 · 0 评论 -
UILabel 富文本 显示文字和图片
// 在UILabel上显示文字和图片 //UIlabel 富文本 字体显示不同颜色 UILabel *testLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, 320, 30)]; testLabel.backgroundColor = [UIColor lightGrayColor];原创 2016-10-10 13:24:25 · 3980 阅读 · 0 评论 -
iOS根据文字字数动态确定Label宽高
计算单行文本的长度 iOS7中用以下方法 - (CGSize)sizeWithAttributes:(NSDictionary *)attrs; 替代过时的iOS6中的- (CGSize)sizeWithFont:(UIFont *)font 方法 // iOS7_API_根据文字 字数动态确定Label宽高 // 设置Label的字体 HelveticaNe原创 2016-10-08 09:44:42 · 1817 阅读 · 0 评论 -
iOS 动态设置标签
@property (strong, nonatomic) UIView *tableHeadView; NSMutableArray *hotSearchArr; hotSearchArr = [[NSMutableArray alloc] initWithObjects:@"ceshi1",@"ceshi2ceshi2",@"ceshi3ces原创 2017-12-06 12:05:46 · 835 阅读 · 0 评论