Add Return button
-(void) backbtn{
uibutton *backbtn=[[uibutton alloc]initwithframe:cgrectmake (0, A,)];
[Backbtn settitle:@ "return" forstate:uicontrolstatenormal];
Backbtn.titlelabel.font=[uifont Systemfontofsize:12];
Backbtn.imageedgeinsets=uiedgeinsetsmake (2,2,2,2);
[Backbtn setimage:[uiimage imagenamed:@ "Fanhui"] forstate:uicontrolstatenormal];
[Backbtn addtarget:self Action: @selector (Backto) Forcontrolevents:uicontroleventtouchdown];
Uibarbuttonitem *leftbtn=[[uibarbuttonitem alloc]initwithcustomview:backbtn];
Uibarbuttonitem *flexbtn=[[uibarbuttonitem Alloc]initwithbarbuttonsystemitem:uibarbuttonsystemitemfixedspace Target:nil Action:nil];
flexbtn.width=-10;//positive to left, negative to right
self.navigationitem.leftbarbuttonitems=@[flexbtn,leftbtn];
Return button
-(void) backto{
[self dismissviewcontrolleranimated:yes completion:^{
}];
}
The above is a small set of iOS for you to introduce the common settings back button, I hope to help everyone, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!