ios - UINavigationBarItem custom - how to get the corner of tabcontroller? -


i want ask how can icon of navigationtabbaritem left corner (left:0) , right corner (right:0).

my code :

_custombtn = [[uibutton alloc] initwithframe:cgrectmake(0, 0, 44, 44)]; _custombtn.backgroundcolor = [uicolor redcolor]; [_custombtn setbackgroundimage:[uiimage imagenamed:@"ic_msg.png"]forstate:uicontrolstatenormal]; [_custombtn addtarget:self action:@selector(viewbn:) forcontrolevents:uicontroleventtouchupinside]; self.csbtn = [[uibarbuttonitem alloc]initwithcustomview:_custombtn]; 

navigationitem

uibutton *abutton = [uibutton buttonwithtype:uibuttontyperoundedrect];     abutton.frame = cgrectmake(0.0, 0.0, 44, 44); uibarbuttonitem *abarbuttonitem = [[uibarbuttonitem alloc] initwithcustomview:abutton]; [abutton addtarget:self action:@selector(rightbarbuttonaction:) forcontrolevents:uicontroleventtouchupinside];  uibarbuttonitem *spacefix = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemfixedspace target:nil action:null]; spacefix.width = -10;  self.navigationitem.rightbarbuttonitems = @[spacefix, abarbuttonitem]; 

please add spacefix resolve problem may lot


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -