重慶分公司,新征程啟航
為企業提供網站建設、域名注冊、服務器等服務
為企業提供網站建設、域名注冊、服務器等服務
本來已經寫了很多,就因為切換頁面就沒有了,以后切之前得注意了 mac電腦的傷不起
成都創新互聯公司是專業的龍井網站建設公司,龍井接單;提供成都做網站、成都網站制作,網頁設計,網站設計,建網站,PHP網站建設等專業做網站服務;采用PHP框架,可快速的進行龍井網站開發網頁制作和功能擴展;專業做搜索引擎喜愛的網站,專業的做網站團隊,希望更多企業前來合作!UI里面有很多控件比如UIView UIControl UILabel UIButton UIScrollView UIWindow UIWebView UITabBar UITableView UITableViewCell UIToolbar UITextField UITextView UIImageView UIPageControl UIPickerView UIProgressView UIAlertView UISearchBar UISegmentedControl UISearchBar UISlider UISwitch UICollectionView 6.0 UICollectionReusableView等
控制器有
UIPageViewController UIPopoverController UIImagePickerController UINavigationController UISplitViewController UICollectionViewController UITableViewController
開在寫了,廢話少說,
先將UILabel UIView和UIResponder后面在寫,
UILabel的
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
UILabel *aLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 100, 280, 100)];
aLabel.backgroundColor = [UIColor greenColor];
aLabel.text = @"這是我在2013年的程序,今天也是我要寫ios、mac和操作系統相關的技術博文,我的bolg分別是(1)http://www.cnblogs.com/leevaboo(2)http://blog.csdn.net/leevaboo,(3)http://3660064.blog.51cto.com";
aLabel.textAlignment = NSTextAlignmentCenter;//左中右對其的模式 default is left
aLabel.textColor = [UIColor blueColor];//文本顏色default is blackColor
aLabel.font = [UIFont systemFontOfSize:20];//字體的大小default is 17
aLabel.shadowColor = [UIColor redColor];//陰影default is nil
aLabel.shadowOffset = CGSizeMake(0, 1);//陰影的位置,按照xy軸的坐標位置來,default is (0 -1)表示x = 0 ,y = -1 表示在陰影在正下方 x軸左到右是負到正,y上到下是負到正
aLabel.lineBreakMode = NSLineBreakByTruncatingTail;//文本超過label的邊界的文本截取方式default is NSLineBreakByTruncatingTail
aLabel.highlightedTextColor = [UIColor purpleColor];//設置文本的高亮顏色 default is nil
aLabel.highlighted = NO;//打開高亮default is NO
aLabel.userInteractionEnabled = NO;//是否交互.default is NP
aLabel.adjustsFontSizeToFitWidth = NO;//根據寬調整字體的大小 但是numberOfLines = 1;default is NO
aLabel.numberOfLines = 0;
float height = [aLabel.text sizeWithFont:aLabel.font constrainedToSize:CGSizeMake(280, 100000) lineBreakMode:NSLineBreakByWordWrapping].height;//根據字符串的長度和字號的大小和Label的寬度自動計算label的高度
aLabel.baselineAdjustment = UIBaselineAdjustmentAlignBaselines;//設置label的基準線
aLabel.frame = CGRectMake(20, 100, 280, height);
[self.view addSubview:aLabel];
[aLabel release];
// Do any additional setup after loading the view.
}
本來已經寫了很多,就因為切換頁面就沒有了,以后切之前得注意了 mac電腦的傷不起
UI里面有很多控件比如UIView UIControl UILabel UIButton UIScrollView UIWindow UIWebView UITabBar UITableView UITableViewCell UIToolbar UITextField UITextView UIImageView UIPageControl UIPickerView UIProgressView UIAlertView UISearchBar UISegmentedControl UISearchBar UISlider UISwitch UICollectionView 6.0 UICollectionReusableView等
控制器有
UIPageViewController UIPopoverController UIImagePickerController UINavigationController UISplitViewController UICollectionViewController UITableViewController
開在寫了,廢話少說,
先將UILabel UIView和UIResponder后面在寫,
UILabel的
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
UILabel *aLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 100, 280, 100)];
aLabel.backgroundColor = [UIColor greenColor];
aLabel.text = @"這是我在2013年的程序,今天也是我要寫ios、mac和操作系統相關的技術博文,我的bolg分別是(1)http://www.cnblogs.com/leevaboo(2)http://blog.csdn.net/leevaboo,(3)http://3660064.blog.51cto.com";
aLabel.textAlignment = NSTextAlignmentCenter;//左中右對其的模式 default is left
aLabel.textColor = [UIColor blueColor];//文本顏色default is blackColor
aLabel.font = [UIFont systemFontOfSize:20];//字體的大小default is 17
aLabel.shadowColor = [UIColor redColor];//陰影default is nil
aLabel.shadowOffset = CGSizeMake(0, 1);//陰影的位置,按照xy軸的坐標位置來,default is (0 -1)表示x = 0 ,y = -1 表示在陰影在正下方 x軸左到右是負到正,y上到下是負到正
aLabel.lineBreakMode = NSLineBreakByTruncatingTail;//文本超過label的邊界的文本截取方式default is NSLineBreakByTruncatingTail
aLabel.highlightedTextColor = [UIColor purpleColor];//設置文本的高亮顏色 default is nil
aLabel.highlighted = NO;//打開高亮default is NO
aLabel.userInteractionEnabled = NO;//是否交互.default is NP
aLabel.adjustsFontSizeToFitWidth = NO;//根據寬調整字體的大小 但是numberOfLines = 1;default is NO
aLabel.numberOfLines = 0;
float height = [aLabel.text sizeWithFont:aLabel.font constrainedToSize:CGSizeMake(280, 100000) lineBreakMode:NSLineBreakByWordWrapping].height;//根據字符串的長度和字號的大小和Label的寬度自動計算label的高度
aLabel.baselineAdjustment = UIBaselineAdjustmentAlignBaselines;//設置label的基準線
aLabel.frame = CGRectMake(20, 100, 280, height);
[self.view addSubview:aLabel];
[aLabel release];
// Do any additional setup after loading the view.
}
另外有需要云服務器可以了解下創新互聯scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業上云的綜合解決方案,具有“安全穩定、簡單易用、服務可用性高、性價比高”等特點與優勢,專為企業上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。