ios - MKAnnotation Left / Right Accessory View Misplacement -


cannot figure out why occurs. when title , subtitle text long, expected ... @ end of text. left , right accessory views messed this.

enter image description here

the accessory view frame , bounds have not changed. same when views drawn normally. like,

enter image description here

either title can long or subtile can long, , views not misplaced. when both long , have trailing ... messed up.

cannot find documentation max size of view / or text length etc should be.

i've resorted hack of counting string length , when exceed limit print out short title or subtitle. i'd rather leave , figure out why views pushed , how fix.

thanks

note: im use default mkannotationview, setting title , subtitle.

this seems bug can workarounded in different ways.

the rightcalloutaccessoryview vertical alignment can fixed setting autoresizingmask follows:

uibutton *rightbutton = [uibutton buttonwithtype:uibuttontypeinfolight];  rightbutton.autoresizingmask = uiviewautoresizingflexiblebottommargin | uiviewautoresizingflexibletopmargin; annotationview.rightcalloutaccessoryview = rightbutton; 

the same trick not work leftcalloutaccessoryview apparently has bug how nslayoutattributes setup default. in case easiest (ugliest) , fix found hard code height of view assign leftcalloutaccessoryview: 54px on ios8, 45px on ios7.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -