Set display style when displaying picture files
[IV Setcontentmode:uiviewcontentmodescaleaspectfit];
There are three styles of fill filled with fit to make ... Adjusting scale aspect direction
1,scaletofill, even if the picture is distorted, fill it with
2,scaleaspectfit fit this full display on the screen has blank
3,scaleaspectfill fill the screen picture without distortion can slide left and right
A space for displaying large amounts of text Uitextview
Can be added to the Uiviewcontroller
Uitextview *tv=[[uitextview Alloc]initwithframe:self.view.bounds];
Tv.text=[nsstring Stringwithcontentoffile:path encoding:nstfu8stringencoding Error:nil];
Add to Viewcontroller
To stitch the text in a certain format
NSString *nss1=[nsstring stringwithformat:@ "%@%@%@%@", n,b,a,c]; This is the N,b,a,c four text in the middle plus a space splicing
\ n means to splice with a newline.
The text output of the same spacing
Nsarry *ary1=[nss1 componentsseperatedbystring:@ "\ n"];
This is to convert a string separated by a newline character into an array
Load the contents of an array into a string with something of the same spacing
Nsmutablearray *numberarrar;
NSString *allneirong;
Allneirong =[numberarray componentsjoinedbystring:@ "\ n"];
Referencing the contents of a TXT file (actually accepting the content with a large string)
NSString *allneirong=[nsstring stringwithcontentoffile:@ "users/huangchaojie/desktop/file. txt"
Encoding:nsutf8stringencoding Error:nil];
Enter a string into a TXT file to save
[Nss1 writetofile:@ "users/huangchaojie/desktop/file. txt" Atomically:yes encoding:nsutf8stringencoding Error:nil];
Yi
0914 referencing file text