Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

akaash1087

macrumors newbie
Original poster
Jul 7, 2010
23
0
I am actually working on an splitview application.In one of the screens(Detailviewcontroller) I have a button which on clicking should launch a viewcontroller.Due to navigation requirements I have launched navigationcontroller (which has this viewcontroller as its Rootviewcontroller)
I have used PresentModalViewcontroller(navigationcntroller,true);
The problem is that there is an image on my viewcontroller which I want to display but it just doesnt appear when I run the app.I have configured an imageview using Interface builder and attached an image,the way it is done normally.
For experimenation ,I have attached number of other controlls like buttons,labels to see whether they appear or not and they do.Image view is the only thing that does not appear.
I just cant understand what is happening....
Is it that PresentModalViewcontroller being deprecated does handle things properly??
Actually I have used it a number of times in the past and it worked fine.
Is it permissible to to display an image on VC when it is presented modally.
I have actually set ModalTransitionStyle as FlipHorizontal
and UIModalPresentationStyle as CurrentContext .
Has that got something to do with this??
I repeat that all the controlls are visible like labels,buttons.Imageview is the only thing that is not appearing.

Any help would be highly appreaciated..
 
One thing though, are you building on Simulator or on device? ;)
Did you do a log of subviews?

try this
Code:
 NSLog(@"show my subviews: %@", self.view.subviews);

Put that in the viewDidLoad (this means your XIB got initialised).
It will show all the subviews your view has, if it has the imageview, but no real image, it might be hidden below something or like I said, the capitalisation of your image is wrong, that's why it can't find it on the device (on simulator it doesn't care about capitalisation), so @"myImage.png", is not the same as "MyImage.png", the first will work on both if your image is really called like that, but the last will only work on the simulator if your image is really named myImage.png..

Hope that helped.

Thijs
 
thx for taking out time..
Actually , I am doing it on simulator .I have taken care not to capitalise names.As per your suggestion I equated the my view's subview property to an Uiview array and then debugged it.I found that the array does contain image(apart from the other things)
 
Most likely the problem is the image, not the imageView. How do you set the image for the imageView? Show the code.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.