objective c - Add matching style button/action -


it's been on year looking answer this, how can add matching-style button same area/handler buttons

  • do need re-style match
  • do need manually set position new button ?

an example cydia tweak " safari download manager "

before :

enter image description here

after :

enter image description here

you can see in order add new button, current/old buttons align/position had changed smaller,

  • do have manually ?

i'm not highly experienced objective-c re-image i'm saying in html :

as example, area buttons handler :

<div id="buttons" class="top-buttons">   <img src="back.png" >   <img src="forth.png" > </div> 

for html if want add same button style matching top-buttons class, need add new tag inside div

is how objective-c ( or theos ) works ?

note can other buttons, example in second photo add new manual download row.. etc

disclaimer: done using iphone 5 ios 6.1.4.

if dump headers safari, can find 2 potentially useful classes into:

browsertoolbar:
@interface browsertoolbar : uitoolbar <webbookmarksclientdelegateprotocol> { id<browserpanel> _browserpanel; nsarray *_defaulttoolbaritems; spacedbarbuttonitem *_backitem; spacedbarbuttonitem *_forwarditem; spacedbarbuttonitem *_actionitem; spacedbarbuttonitem *_bookmarksitem; spacedbarbuttonitem *_cloudtabsitem; spacedbarbuttonitem *_tabexposeitem; spacedbarbuttonitem *_fullscreenitem; bool _showingcloudtabbutton; ... } ... - (void)_updatefixedspacing; - (void)updatebuttonsanimated:(bool)animated; ... @end

and spacedbarbuttonitem:
@interface spacedbarbuttonitem : uibarbuttonitem { uibarbuttonitem *_precedingfixedspace; } @property(readonly, assign, nonatomic) uibarbuttonitem *precedingfixedspace; @end

using cycript, can see browsertoolbars have _items ivar, inmutable nsarray. however, might possible swap array containing original set of spacedbarbuttonitem plus custom ones.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -