adding view controller as child view in ios
问题 Hi i am trying to add a view controller as a child view . and later remove this view controller form parent view.I am using following code for this purpose. self.loginView = [self.storyboard instantiateViewControllerWithIdentifier:@"LOGIN"]; [self.view addSubview:self.loginView.view]; This code works fine for iOS8 but in iOS7 this code is not working it shows the half of the screen.On half part login is shown. What could be the solution for this?? 回答1: Add a custom UIView object in your main