Monday, April 16, 2012

Multiple use of customized UIView is invisible

I'm working on the customized UIView, but there's a really weird problem. I create a class called CustomBackgroundView which is a subclass of UIView. This customized view is aiming to work as a default background for other views. Basically, I just added three UIImageViews in CustomBackgroundView.



I added a couple of UIViews to a UIViewController in the storyboard and set the custom class property to CustomBackground for each of the UIViews. However, only the first customized UIView came into being. Others just didn't show up or like transparent.



I don't know whether I have to do something else to reuse a customized UIView in different places. Is it related to the image resource that is used in the customized UIView or is there anything I neglected..



Any help is appreciated! Thanks a lot~!





No comments:

Post a Comment