ios view的frame和bounds之区别(位置和大小)
摘要:一、首先列一下公认的资料: 先看到下面的代码你肯定就明白了一些:-(CGRect)frame{ return CGRectMake(self.frame.origin.x,self.frame.origin.y,self.frame.size.width,self.frame.size.height
阅读全文
posted @
2018-03-22 14:38
4Dream
阅读(468)
推荐(0)
UILabel 属性
摘要:在iOS编程中UILabel是一个常用的控件,下面分享一下UILabel的相关属性设置的方法。 很多学习iOS6编程都是从storyboard开始,用到UILabel时是将控件拖到storyboard中生成实现,如果想要在-(void)viewDidLoad中用代码如[_label initWith
阅读全文
posted @
2018-03-22 12:28
4Dream
阅读(236)
推荐(0)
自定义iOS7导航栏背景,标题和返回按钮文字颜色
摘要:在iOS7下,默认导航栏背景,颜色是这样的,接下来我们就进行自定义,如果你仅仅是更改一下背景和颜色,代码会很简单,不需要很复杂的自定义View来替代leftBarItem更改导航栏的背景和文字Color方法一:[objc]view plaincopy//setNavigationBar背景颜色&ti...
阅读全文
posted @
2015-07-09 16:02
4Dream
阅读(232)
推荐(0)
更改StatusBar 文字颜色
摘要:黑色statusBar[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;白色statusBar[UIApplication sharedApplication].statusBarStyle = UI...
阅读全文
posted @
2015-07-09 10:34
4Dream
阅读(408)
推荐(0)
UISearchBar
摘要:#import "MDRootViewController.h"@interface MDRootViewController ()@property(nonatomic,strong)UITableView *tableView;@property(nonatomic,strong)NSMutab...
阅读全文
posted @
2015-06-09 13:13
4Dream
阅读(174)
推荐(0)