Interface Builder is not working as expected after updating Xcode to 11.2.1 (11B53) - interface-builder

There are empty spaces on top of the View Controller. The UI was correct before updating to the latest Xcode Version. After updating to the latest version i got this behaviour. Some of the View Controller was correct updated butnot all. Check the Image to understand my problem (The View controller on the right side has an empty gray space.
If you compile it you see the same behaviour on the simulator (on all devices).
Looks like a second application in the background when you start the app.
I hope someone can help me.
Thanks!

you should config your ViewController when presenting like that:
yourViewController.modalPresentationStyle = UIModalPresentationFullScreen;
[self yourViewController animated:YES completion:NULL];

Try to set, parent ViewController's (Edit MemberVC, I assume) Top Bar property to None.

Related

UICollectionViewCell for AppleTV does not display contents in Interface Builder

When trying to build up a UICollectionViewCell for an AppleTV app, its contents are not displayed, making it more difficult to good design. Does anyone know whether this is a bug or something I'm doing wrong?
The contents do appear when moving, below are 2 screenshots, one of the normal state, and one of the state of moving an element.
I'm using Xcode version 7.1.1 (7B1005)
I tried and it looks like the cell will only be rendered, if you embed it in a collection view which is embedded in the main view. Additionally you have to add some auto layout constraints:

IOS 8 UIMenuController not working

I have a view that is a subclass UITextView. I bring up the UIMenuController after selecting a word. I select 'cut'. Nothing happens. The same exact code works fine in IOS 7. I have for debugging purpose included an override for
(void)cut:(id)sender
{
}
On IOS 7 it gets called. Nothing on IOS 8. I have check that the first responder is in fact the view in question. I have added an observer for the 'menuControllerDidShow' notification and checked for 'view.isFirstResponder' to verify this. Any ideas? Thanks
I've subclassed 'UIApplication' so I can intercept the calls to sendEvent and sendAction. What I'm seeing is that when I tap the 'cut' command in the UIMenuController I get a 'UIEvent'.
This event is UITouch object. In the 'UITouchPhaseBegan' I inspect the object and see that it's view is set to a 'UICalloutBarButton' object. At the 'UITouchPhaseEnded' phase the view is set to null. On IOS 7 this is not the case, the view is still pointing to the 'UICalloutBarButton' in 'UITouchPhaseEnded' state. How can I determine why this view is getting set to null? Thanks
This issue has been fixed in 8.3 beta.

UITableView no longer scrolling using xCode 4.5, deploying on 5.x or 6.0

Deployed project using UITableView for display of images.
Upgraded to xCode 4.5, suddenly my UITableView no longer scrolls.
This occurs both on the device and on the simulator with iOS 5.0 -> 6.0
Additionally, I have found that I can no longer set the number of minimum touches for the PanGestureRecognizer programmatically.
Other StackOverflow ticket
In fact, a Zombie analysis reveals that the recognizer has been released. This could definitely explain the above behavior. My attempt to set the recognizer is as follows and crashes.
UIPanGestureRecognizer* pgr = [imageTableView panGestureRecognizer];
[pgr setMinimumNumberOfTouches:2];
[pgr setMaximumNumberOfTouches:2];
Is anyone else seeing this issue?
I had a similar problem when moving to iOS6/XCode 4.5. It seems that the UIPanGestureRecognizer now steals touches from underlying UIScrollViews or UITableViews.
I found a work around for this in the post below. It's not the top rated answer, so I'll re-paste the content below as well:
iphone - UIGestureRecognizer prevents UITableView from scrolling in Xcode 4.5
I had the same issue: I used to drag my TabGestureRecognizer directly onto the storyboard instead of creating them through code. With iOS6 this now seems to break scrolling.
I prefer adding views, gestures, etc directly onto the storyboard instead of through code.
You can still do this but with two changes:
1) Referencing Outlet Collections
Right-click the GestureRecognizer which is visible to you within the scene's dock.
Clear the section Referencing Outlet Collections
2) Attach the GestureRecognizer to the related view through code
Create an outlet for your GestureRecognizer
Add the following line within the viewDidLoad method:
[self.tableView addGestureRecognizer:_tabGesture];

Xcode Webview Output "null"

I'm developing an iPad app that supposed to output a website to another view, but when the second view loads, it comes up null. I'm using storyboard to link a button to push the web view controller and load the webpage into that view. The code works fine in the first view (indicated by NSLog), but NSURL never makes it to the second view (NSLog "Null").
Code in IBAction on first view:
self.sanctuaryWebViewController = [[SanctuaryWebViewController alloc]init];
self.sanctuaryWebViewController.URL = [NSURL URLWithString:#"http://www.website.org"];
Code in ViewDidLoad Second View Controller:
NSURLRequest *requestObject = [NSURLRequest requestWithURL:URL];
[webView loadRequest:requestObject];
I have done this in an Iphone app fine declaring a nav delegate to push the view, but not sure if using storyboard or splitview has anything to do with the problem. I spent hours searching for help and tried several different ways to code, but no go. I think I'm close, but not quite there. Using Xcode 4.4 and running on OS 10.8; IOS 5.1
Thanks for any suggestions
Can you show us more of the second view controller's code? I'm assuming you are using ARC? I assume you mean the result is coming up nil rather than NSNull (there is a difference)? Have you connected the webView in the second view controller to the UIWebView in the Storyboard/IB?
Good luck!
I was declaring UIWebview twice. "webview" and "_webview". I removed the instant variable declared in .h and kept the property. Made sure "_webview" was used. Also, Since I linked a segue to a button, I got rid of the IBAction method and replaced it with the prepareForSegue method, which calls the segue. Really had know idea what I was doing using storyboard. I knew about the segue methods, but did not realize they are not linked to the button like IBAction methods. They seem to be used in similar way as calling xib files, but calling segues.

applicationDidEnterBackground: Issue

I wrote an app that has about 3 different view controllers for each view in the tab bar. I called applicationDidEnterBackground: in each of the view controllers to save all the data in that specific view after the home button is tapped. This runs flawlessly on the iPad simulator, but for some reason, it crashed after trying to edit the data on the iPhone simulator. I thought this is probably an issue with putting the applicationDidEnterBackground: in the view controller, but if that was the issue, then wouldn't it crash on the iPad simulator as well?
I know that I should put applicationDidEnterBackground in the app delegate, but my method looks sort of like this:
- (void)applicationDidEnterBackground:(NSNotification *)notification {
NSMutableArray *array = [[NSMutableArray alloc] init];
[array addObject:firstField.text];
[array addObject:secondField.text];
[array writeToFile:[self dataFilePath] atomically:YES];
}
If I put this in the App Delegate, of course it doesn't recognize firstField or secondField because I did not declare it in header file or synthesize it or anything. If I were to declare everything in the App Delegate, then the outlets in my nib file will fail because each of the File's Owner's class is one of those specific view controllers.
Is the placement of applicationDidEnterBackground: not even my issue since it runs fine on the iPad simulator?
Also, it used to run fine on the iPhone simulator as well. I changed the Image View's background on all of the nibs, then this started happening. I rechecked all my outlets and actions and they match up fine.
EDIT: I fixed it. Turns out I had an extra field that I decided to add to the iPad's nib, but not the iPhone's. I though it would be fine, not the case though. That explains all the weirdness that was going on. I deleted the field in the iPad's nib and everything is A Okay. Phillipe, thank you so much for your help and offer to look it over for me, that is incredibly generous.
I fixed it. Turns out I had an extra field that I decided to add to the iPad's nib, but not the iPhone's. I though it would be fine, not the case though. That explains all the weirdness that was going on. I deleted the field in the iPad's nib and everything is A Okay. Phillipe, thank you so much for your help and offer to look it over for me, that is incredibly generous.

Resources