Knowledge base
Load a picture
Uiimageview *imageview =[[uiimageview alloc]initwithframe:cgrectmake (100, 100, 200, 200)];
Imageview.image=[uiimage imagenamed:@ "22.png"];
[Self.view Addsubview:imageview];
Pop-up window
NSString *msg = @ "F*au*ck U";
Uialertview *alert = [[Uialertview alloc] initwithtitle:@ "message" message:msg delegate:self "No" otherbuttontitles:@ "Yes", nil]; [Alert show];
A method of integrating an elastic window
NSString *a = [NSString stringwithformat:@ "group S%d", index];
[Self alert:a];
String numeric conversions
1, string concatenation
NSString *newstring = [NSString stringwithformat:@ "%@%@", TEMPA,TEMPB];
2, character Fu Jing int
int intstring = [newstring intvalue];
3,int Turn characters
NSString *stringint = [NSString stringwithformat:@ "%d", intstring];
Solve the Chinese garbled problem, post can also be used, TextField can also be used.
[NSString stringwithcstring:[str utf8string] encoding:nsutf8stringencoding];