开发者

label and scroll view

开发者 https://www.devze.com 2023-03-01 03:01 出处:网络
HI FRIENDS.. I use a scroll view and a label now i want that when i scroll that , label also scroll with that and set to next locatio开发者_运维问答n , i set paging enable = YES , so i want that ther

HI FRIENDS.. I use a scroll view and a label now i want that when i scroll that , label also scroll with that and set to next locatio开发者_运维问答n , i set paging enable = YES , so i want that there are 5 images and when i did scrolling the label i set is also move and show in other position.

thanks

label and scroll view

label and scroll view


To scroll a UILabel (or anything for that matter) WITH a UIScrollView, simply add the label to the UIScrollView.

You can easily do this in Interface Builder by the obvious methods.

You can also do this programmatically by utilizing the addSubview: method.



You can do one thing you change frame of label when you scroll in delegate method of scrollview or you can also make 5 same label in all 5 pages.
Good Luck


Well if you have added a scrollview on top of a uiview you can add that label on the view and then bring it to front. then you dont have to worry about changing frame of the uilabel as it will be always on top of the scrollview and at the same position and also you can change the text of that label when the user scrolls in pagecontrol value changed method.

0

精彩评论

暂无评论...
验证码 换一张
取 消