Shimon Wiener
Shimon Wiener

Reputation: 1180

UIViewControllers flicering one above the other

I'm updating an app that was uploaded to AppStore as ios 6, to fit the IOS 7 SDK, i have one problem with one UIViewController i see UIViewControllers flickering one above the other for a second and then i can see the second one as i should, I'M adding this picture:

UIViewController on UIViewController

the orange color in the middle of the ViewController is from the previous one, it happened only on IOS 7 the code that push to the next view controller is this:` - (IBAction) goButtonPressed { NSString *UsersListViewControllerXIB = [[NSString alloc]init]; if (sing.iPhoneType == 5) { UsersListViewControllerXIB = @"UsersListViewController5"; } else{ UsersListViewControllerXIB = @"UsersListViewController";

    }

    // sanity check
    if (toAge < fromAge)
    {
        self.alert.title = @"שגיאה";
        self.alert.message = [NSString stringWithFormat:@"\"עד גיל\": %d - לא יכול להיות     קטן מ %d", toAge, fromAge];
        [self.alert show];
        return;
    }
    NSLog(@"goButtonPressed: area:%d from:%d to:%d ", areaCode, fromAge, toAge);
    UsersListViewController *usersListViewController = [[UsersListViewController alloc]               initWithNibName:UsersListViewControllerXIB bundle:[NSBundle mainBundle]];

// save new defaults value:
[[NSUserDefaults standardUserDefaults] setInteger:toAge forKey:@"OnlineAgeMax"];
[[NSUserDefaults standardUserDefaults] setInteger:fromAge forKey:@"OnlineAgeMin"];
[[NSUserDefaults standardUserDefaults] setInteger:areaCode forKey:@"OnlineArea"];

// call synchronize to save changes to disk now
[[NSUserDefaults standardUserDefaults] synchronize];

usersListViewController.areaCode = areaCode;
usersListViewController.fromAge = fromAge;
usersListViewController.toAge = toAge;
usersListViewController.genderCode = [self generateGenderCodeAccordingToUserPref];

NSLog(@"genderCode = %@", usersListViewController.genderCode);

usersListViewController.userGuid = [[NSUserDefaults standardUserDefaults]
                                    objectForKey:@"userGuid"];
usersListViewController.listText = @"מחוברים";
self.title = @"הגדרות מחוברים";

[self.navigationController pushViewController:usersListViewController animated:YES];

}`

Upvotes: 0

Views: 34

Answers (1)

CodingMeSwiftly
CodingMeSwiftly

Reputation: 3261

Most likely: The backgroundColor of your second (the pushed one) viewController has alpha = 0 ([UIColor clearColor])

Upvotes: 1

Related Questions