1 //Label Uilable-display text2 //1. Create a label3UILabel *lable =[[UILabel alloc] init];4 //2. Set the coordinates and size of the label5[Lable Setframe:cgrectmake (0, -,375, -)];6 //3. Label Contents7Lable.text =@"";8 //Set Font9Lable.font = [Uifont systemfontofsize: -];Ten //Set Font Color OneLable.textcolor =[Uicolor Blackcolor]; A //Set Content Wrapping -Lable.numberoflines =0; - //Set rounded corners theLable.layer.cornerRadius =Ten; -Lable.layer.masksToBounds =NO; - //Set label content centered -Lable.textalignment =Nstextalignmentcenter; + //set the label background -Lable.backgroundcolor =[Uicolor Blackcolor]; + //Loading Pictures AUiimageview *tempview =[[Uiimageview alloc] init]; at[Tempview Setframe:cgrectmake (255,0, -, -)]; -Tempview.image = [UIImage imagenamed:@"1.png"]; - //4. Load a child view on top of the current view - [Self.view addsubview:lable]; -[Lable Addsubview:tempview];
IOS ui-lable Tags