ios - Getting all subviews for a UIScrollView -
i need array of subviews in uiscrollview. right i'm using
nsarray *subviews = [myscrollview subviews]; but seems returning subviews visible @ time code run. need subviews in whole extent of uiscrollview, hidden (as in off screen). how that?
essentially, i'm looking contentsize property of uiscrollview, except instead of returning size of uiscrollview if big enough display of it's content, want return content itself.
edit: think i've figured out: scroll view isn't working uitableview - , think it's deque-ing cells off screen on me, , that's why aren't showing up. i'm going testing confirm.
try following code working me.
for(uiview * subview in myscrollview.subviews ) // here write name of scrollview. { // here can subviews of myscrollview. // check subview specific uiclass such label, button, textfiled etc.. write following code (here checking example uilabel class). if([subview iskindofclass:[uilabel class]]) // check subview class uilabel class? { // can write code here uilabel; } }
Comments
Post a Comment