My app works great on the emulator, but not so good on the phone. Two issues:
1 - I have a UIScrollView that contains a UIImageView, on the phone, sometimes the UIImageView never paints itself, so that area shows the results of a table view that animated out to reveal it. This never happens in the emulator
2 - the application is prone to crashing, and my logging makes me think it's within this code:
// called after this controller's view will appear
- (void)viewWillAppear

BOOL)animated
{
NSLog(@" DCOImageDisplayController - (void)viewWillAppear

BOOL)animated called" );
// for aesthetic reasons (the background is black), make the nav bar black for this particular page
self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
// match the status bar with the nav bar
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;
visible = YES;
currentIndex = 0;
UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:
[NSArray arrayWithObjects:
[UIImage imageNamed:@"left arrow.png"],
[UIImage imageNamed:@"right arrow.png"],
nil]];
[segmentedControl addTarget:self action:@selector(segmentAction

forControlEvents:UIControlEventValueChanged];
segmentedControl.frame = CGRectMake(0, 0, 90, 40);
segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
segmentedControl.momentary = YES;
[segmentedControl setTintColor:[UIColor blackColor]];
UIBarButtonItem *segmentBarItem = [[UIBarButtonItem alloc] initWithCustomView:segmentedControl];
self.navigationItem.rightBarButtonItem = segmentBarItem;
}
I've tried adding the SegmentedControl in other places, so it doesn't get created every time, but I've been unable to make this work. Does anyone have any suggestions ?
Actually, while I'm not sure this is not an issue, as I've made this view a member variable, I am wondering if it being a member is why my images never update, once the first has been set ( although this doesn't make a whole lot of sense, none of this makes sense to me ). However, when the app crashes, this method actually finishes ( I added some logging to say the method was done ) and then the app freezes. It works fine on the emulator, so I am not sure what is going wrong.