iphone-Xcode 5 xib/storyboard Problems - ios

Okay- I have this space shooter app based on uiimageviews. Originally, I made it on Xcode 3. Then, I converted it to Xcode 4. However, I did not use story mode. I stuck with the .xib files and it worked fine after I edited some of the basic code around. Then, when Xcode 5 came out, I couldn't do that anymore. When I tested my app on the iPad, most of the screen was grey and only the top corner had my game in it. I would like it to be able to auto size using just the xib files. Also, with the 4 inch and 3.5 inch iPhones, how can i make a view that fits them all? I tried storyboard, but my app was based on .xib files. It is one view controller, but it loads a lot of different .xib 's. What is my solution?

The solution is to switch your app from universal to just iPhone.

You can find a solution to a problem, similar to the one you are having, in the following stackoverflow How to convert a project using XIBs to Storyboard?

Related

LaunchScreen.storyboard and Main.storyboard displaying differently (iOS 13 / Swift 5)

I've read that the way to animate a launch screen in iOS13 and Swift 5 is to create a LaunchScreen.storyboard and Main.storyboard that are identical, and then animate the Main.storyboard elements when the view has loaded.
I have created a LaunchScreen.storyboard and Main.storyboard that I believe are identical - each consist of one image aligned to the centered of the superview. When I run the app, I can visibly see the difference when the storyboards transition from one to the other. Is there something I might be doing wrong here to create identical storyboards?
I have included screenshots of the storyboards that show the constraints I've applied to each respective UIImage on each storyboard. Is this the right approach to achieve an animation of the Launch Screen? Are there some inherit differences about the types of storyboards I'm working with here that I might be overlooking? Any help would be greatly appreciated.
I solved my issue - I don't have a satisfying answer with a lot of closure, but essentially I just uninstalled the app from my simulator and rebuilt it and the issue was gone. Some previous version was being cached and hadn't been overwritten with the changes I introduced. Thank you for the folks to reached out to assist me.

Center a UIView inside a TableViewCell

I've been facing an weird issue which I have never experienced before (pretty new to iOS). I am trying to develop a blog reader app and I am using a UITableView inside my main View. Within the TableView I have added 1 prototype cell and modified it's height to be somewhat bigger.
In order to create a "floating", "shadow" or "card" effect within the TableViewVell I have added another View which will contain a cover image and a summary.
The problem I am facing is related to the layout that is displayed by the Preview Assistant for Storybords.
Even though for iPhone 8 (xCode 9.1) everything looks fine based on the constraints that I have put in place, for iPhone SE and 8 Plus things look weirdly different even though during the simulation things do not really look as described.
I have watched WWDC Videos, YouTube Videos, even some great tutorials but none seem to go beyond the basics and actually cover this issue that I am facing.
Here is a screenshot:
XCode Storyboards Preview
I made a simplified demo ofthe project which can be checked out on GitHub:
https://github.com/sebastiannitu/ConstraintIssues
I would very much appreciated if seomeone would calrify this issue for me once and for all. I am sure it's just me doing something silly but I cannot really waste any more time with this. I've already invested about 2 weeks in trying to figure this out!
Thank you very much for your replies in advance!
It's a mild bug in Xcode, but no big deal. Do this:
Change the device type in the canvas, e.g. to iPhone SE.
Switch away to your code, e.g. ViewController.
Switch back to the storyboard. Notice that the constraints have now fixed themselves in the canvas!
Show the Preview for that device type.
So it's mildly annoying, but it does work. Here's the preview for the iPhone SE:
Here's the preview for the iPhone X:
your constraints setup is fine . problem is with only assistant editor. if you run it in your simulator, View (orange View) will resize currectly.
Here is the screenshot for orange View, when running in iPhone 8s (left) and iPhone 5s.
i am not uploading project, but if you have problem then let me know.

Xcode8 Controllers are Grey which are designed in Xcode 7 with size classes

I am making my iOS Application Compatible with iPad.I have designed the UI of my Application with Xcode 7 with size classes which is more specifically designed for iPhone, Now i have to upgrade it to support iPad also.
Now with Xcode 8 when i select iPad from Storyboard with Device Pan then most of the controller are Greyed i.e. those controllers are not showing on iPad on the device also and on the Storyboard also. Please check the screenshot for that
I know the reason why they greyed out, because they are designed with size classes for a different size.
Now my question is, is it possible somehow to use this controller for iPad without Redesigning the UI and updating the Auto layouts, as of now i am not seeing any way to make this controllers available for iPad.
Also i have tried with a way but i think that will be very long, I have to delete this controllers and then add it back and set the layouts again.
Also another way would be design separate storyboard.
So please suggest me what will be a better solution to overcome from this.
Thanks
Even after compatibility conversion to Xcode 8, if still it doesn't seem to work, then you need to check if there are any leftovers like below:
If you want to make sure it works with any width and height, find the constraint:
and remove it by clicking on the x, leaving only installed checked:
That should solve it for Xcode 8.

porting iPad app to iPhone using one storyboard with one storyboard

i am able to make my iPad app running on iPhone but the iPhone screens doesnt fit all the content in. For example my table view main text is hidden, the buttons are very much spaced from the border. I understand the spacing given in my storyboard files in too big for iPhone screen.
I want to make my app work for iPhone with very minimal changes. I dont want to create a new storyboard and rewrite everything. Please suggest a good way.
Thanks in advance.
You need to make the app Universal, make a single storyboard the main storyboard in both target's project settings and use Autolayout to position your UI elements respective of the device. Look into Size classes to keep your design responsive.

LaunchScreen.xib leads to issue in view resizing

I decided to replace LaunchImage by a LaunchScreen.xib, notably to reduce the number of assets - especially in a context with my app comes with numeral targets.
This works well BUT now I am using the LaunchScreen.xib, some views in my app are sized like on iPhone 5 while running on a iPhone 6/6s. Notably UIViewController containing a scrollView or tableView.
Not sure why. I could not figure out any reason. I remember having the same issue with the app behaving like on iPhone4 on a iPhone5 if I did not provide the appropriate LaunchImage assets, but the point of LaunchScreen.xib is not to have several right ?
Would appreciate if someone has some hints.
In your project target general tab, select the LaunchScreen as your Launch Screen File.

Resources