This code is implemented in a similar QQ zone"my space."the round head inside//a round headUiimageview * Headimage = [[Uiimageview alloc]initwithframe:cgrectmake ( -, -, -, -)]; Headimage.backgroundcolor=[Uicolor Graycolor]; Headimage.image= [UIImage imagenamed:@"headimage.jpg"]; Headimage.clipstobounds=YES; HeadImage.layer.cornerRadius= headimage.bounds.size.width/2; HeadImage.layer.borderWidth=2; HeadImage.layer.borderColor=[Uicolor Yellowcolor]. Cgcolor; [Self.view Addsubview:headimage];
*attribtdic = @{nsstrikethroughstyleattributename: [NSNumber Numberwithinteger:nsunderlinestylesingle]}; *ATTRIBTSTR = [[nsmutableattributedstring alloc]initwithstring:@ ' Price:+]= Attribtstr
When using target-action mode, there is a memory hint in ARC mode. Use these lines of code to eliminate hints. (Obsessive-Compulsive Gospel) # pragma clang diagnostic push#"-warc-performselector-leaks" [_target performselector:_action withobject:self];# pragma clang diagnostic pop
set the background color of the Uisearchbar today to Uisearchbar, before the online method has been unable to effectively remove its background color, modify the background color method as follows: Mysearchbar.backgroundcolor= Rgbacolor (249,249,249,1); Mysearchbar.backgroundimage=[self Imagewithcolor:[uicolor clearcolor] size:mySearchBar.bounds.size];//Cancel Searchbar background color-(UIImage *) Imagewithcolor: (Uicolor *) Color size: (cgsize) size{cgrect rect= CGRectMake (0,0, Size.width, size.height); Uigraphicsbeginimagecontext (rect.size); Cgcontextref Context=Uigraphicsgetcurrentcontext (); Cgcontextsetfillcolorwithcolor (context, [color Cgcolor]); Cgcontextfillrect (context, rect); UIImage*image =Uigraphicsgetimagefromcurrentimagecontext (); Uigraphicsendimagecontext (); returnimage;}
= Uirectedgenone;
// resolving cell reuse while ([Cell.contentView.subviews lastobject]! = nil) {*) [cell.contentView.subviews Lastobject] Removefromsuperview]; }
iOS Tips 2