开发者

UIButton in UIView in UIScrollView not loading properly

Kinda confusing title but oh well.

I have a UIScrollView in my vi开发者_开发知识库ewController, in that is 3 UIViews with some buttons in each. I download data from a server and populate it into the view and this works as soon as you start scrolling the UIScrollView, but sometimes the buttons only partially load.

Usually its the button label without my formatting added to it. The button works and as soon as you click the button the rest of view loads correctly. Basically if the UIScrollView is touched in anyway it displays correctly.

I've tried adding and removing the scrollView to the view and I've called [scrollView setNeedsDisplay] and the exact same thing happens.

Anyone come across this?

EDIT: screen shot before and after (just basic to demonstrate whats happening)

UIButton in UIView in UIScrollView not loading properly

UIButton in UIView in UIScrollView not loading properly


I was building the buttons in drawRect which was causing issues. Built the buttons in a separate method and it worked fine.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜