ios - Get access to UIView/UIWindow for the little blue auto correct box -


it seems can access views/windows in ios, don't have experience, hoping can help.

in trying resolve this issue, have ideas, require me uiview used little blue box displayed when word autocorrected.

i think need start this, have no idea go here:

-(void) scrollviewdidscroll:(uiscrollview *)scrollview {     nsarray *windows = [uiapplication sharedapplication].windows;     (uiwindow *w in windows)     {     } } 

i'm adding separate question because can think of other reasons person might want access (maybe change color/style?). understand part of "system" , maybe not best practices modify it, think it's okay long not crucial part of app, , make code pretty safe (i.e.-check pointers nil, error on side of safety). in case, now, want hide it, when should hidden (when scrolling).

once realized uiwindow derived uiview came possible answer, seems work far:

-(void) walkviews:(uiview*)v {     nsstring *classname = nsstringfromclass([v class]);     if([classname isequaltostring:@"uiautocorrectinlineprompt"])         v.hidden = yes;     nsarray *subviews = v.subviews;     for(uiview *sv in subviews)         [self walkviews:sv]; }  -(void) scrollviewdidscroll:(uiscrollview *)scrollview {     nsarray *windows = [uiapplication sharedapplication].windows;     (uiwindow *w in windows)     {         [self walkviews:w];     } } 

instead of having code in scroll event, can put wherever suits needs. main thing walks subviews looking uiautocorrectinlineprompt. instead of hiding it, can whatever needed specific needs.


Comments

Popular posts from this blog

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -