Adjust the position of the navigation bar back button
Create a return buttonUIButton * LEFTBTN = [UIButton Buttonwithtype:Uibuttontypesystem];leftbtn. frame =CGRectMake (0,0,25,25); [Leftbtn setbackgroundimage:[UIImage imagenamed:@ "Icon_back"] forstate:UIControlStateNormal]; [Leftbtn AddTarget:Self action:@selector (leftbarbtnclicked:) forControlEvents:uicontroleventtouchupinside]; uibarbuttonitem * leftbarbtn = [[uibarbuttonitem alloc] INITWITHCUSTOMVIEW:LEFTBTN];; //create UibarbuttonsystemitemfixedspaceUIBarButtonItem * Spaceitem = [[uibarbuttonitem Alloc]initwithbarbuttonsystemitem: uibarbuttonsystemitemfixedspace target:nil Action:nil]; //set the width to a negative value Spaceitem.width =-15; //return two barbuttonitem to Navigationitemself.navigationitem.leftbarbuttonitems = @[spaceitem,leftbarbtn];
IOS Adjust the navigation bar to return the position of the button