Search code examples
iphoneviewsubviews

SUbviews are not displayed when run in device


GoodMorning All!!!

I am creating subviews of UIViews of small dimensions and adding it to the view using the statement [self.view addSubView:myview]; in the viewDidLoad method,when i run the application in the simulator its displaying the subviews created,but when i run the same in the device the subviews are not getting displayed.

My subviews are not empty they have labels on them,i see them on the simulator ,but when i run the same in the device the screen is empty.

I am using Xcode 3.2.4 and the device OS is 4.1.

Please give me solution to this issue as soon as you people can.

Thank you everyone.


Solution

  • Try cleaning before running the application and if still it gets displayed on simulator and not on device then just try bringing the subviews to front.

      [self.view bringSubviewToFront:your_subview];
    

    hAPPY iCODING...