Smartface 4.3 ios horizontal orientation - smartface.io

I have created and new empty project at Smartface 4.3 with defaults and export to xcode with "Portrait" "Landscape Left" and "Landscape Right" options selected. I have also selected xcode orientations as vertical and horizontal. At vertical orientation everything is ok but if horizontal orientation selected screen divided and don't fetch the screen as below picture half of the screen is black. I am using xcode 6.3 with OS X Yosemite 10.10.3. Is there any more setting on xcode or smartface to solve problem?

You can use horizontal layouts by selecting from Project Details -> App Settings section.
We suggest to use horizontal or vertical orientation for application, supporting all the orientation requires MVC modeling hovewer it is not completely supported.

Related

iPhone landscape-only no launch image for iOS7 R4 image asset

I'm fairly certain this is a bug, but in case anyone has found a way around this, let me know.
I've set up an asset catalog in Xcode-5 of launch images. If I set an iOS 7 R4 image it is only used if my app supports portrait orientation. My app is landscape-right only and I do not see the launch image.
The iOS 5,6 images work just fine, and the R4 iOS 5,6 image will actually load "correctly" if I leave out the iOS 7 R4 image.
Has anyone been able to get this to work?
Update
I've found that I can get iOS 7 landscape images to appear, but only if I remove the default (iOS6) images, which doesn't really help me. If you edit the info.plist and change the image orientation to "Landscape (right home button)" (for example), then provide a horizontal image, it will actually show it on iOS 7 at launch. Unfortunately, if you include an iOS 6 image, it shows that instead. Also, you will not see the iOS 7 image listed in the "General" tab of your target if the orientation is anything other than Portrait. This is with Xcode 5.0 and iOS 7.0.2.
My Solution is Don't use asset catalogs and provide
Default.png (320x480)
Default#2x.png (640x960)
Default-568h#2x.png (640x1136)
as bundle in project and iOS will automatically found them(Apple doesn't have landscape launch image for iPhone or iPod, so we need to provide rotated 90 degree of landscape image)
You may need
Default-Landscape#2x~ipad.png
Default-Landscape~ipad.png
if you do iPad too.
Don't forget to delete fixed launch images name in your Project-Info.plist if you have
The solution that we have found is to update the asset catalog and target only iOS 6 and Prior.
How to do it. Go to the asset catalog. And on the top right corner click on the 'Attribute Inspector' icon. Here you can set the Target OS for the Launch Images. Uncheck the iOS 7 check boxes for iPhone. Now you should be able to see the launch images for these devices.
Not enough rep to add a comment, so I'll post an answer to clarify a couple of things.
I wouldn't recommend remudada's answer as it is a workaround that may not be compatible for future releases, and, it does contain that black border problem. Generally warning are there for a reason.
NAlexN's answer works as it addresses the problem - iOS is looking for a portrait splash screen, but if the portrait button is off - problem. So, keep the portrait button on and add to your viewcontroller the following:
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}
I ran into the same problem with my landscape - only application, and here is how I solved it:
Navigate to General tab in your project settings, iPhone Device Orientation section and deselect checkboxes beside Landscape Left and Landscape Right, and select Portrait orientation.
Run the app on iPhone 3.5 or 4 iOS 7 simulator with this settings. The app could crash if you have hardcoded Landscape masks somewhere in your app's view controllers, but it does not matter.
Put checkmarks back for Landscape Left and Landscape Right, but leave Portrait orientation allowed as well. That is you should allow Portrait and both Landscape orientations for iPhone.
I solved it this way:
Go to the project settings and select "Don't use Asset Catalog" in the launch images section. Now you can add the launch images the traditional way. You can still use the asset catalog for the app icons and other images
In XCode 6.1 For IOS 8...Use Launch Image Source as Launch Image...and Replace Launch Screen File from LaunchScreen.Xib to Blank..
Hope this will help........

Black bars showing when running app on iOS 7 (4 inch retina display)

We have an iPod app built with base SDK as 5.1.
App has a tabBarController with three tabs and each tab has a UIViewController to load a different view.
The app works fine for iOS 6.1 and iOS 7 (3.5 inch display) simulator and device but when we run the app on
iOS 7 (4 inch display simulator) or device we are getting black bars at the top and bottom of the view screen in all three tabs.
If anyone can suggest reason for this or some feasible solution to this problem, it would be really helpful for us.
Thanks
First thing is that you must add the required default image for 4 inch screen display. Check Properly in you project have image with name Default-568h#2x.png (640 × 1136 pixels)
This Default-568h#2x.png is Necessary for Support app in 4 inch Screen display
Ones you add this image in to you working Project, Remove old Build from device or Simulatore, clear Project and re build and check Hope you issue will solve.
Edit:-
After fix the black Bar issue you can check the device like my answer Give here check this:-
Detect device type
you have two choice if you can't use AutoLayout
First
Create two xib with same class one for 3.5 inch screen and one for 4 inch screen set using macro with checking which screen appear.
Second
Set Self.view frame using macro with checking which screen appear.
There are also other methods you can use for set self.view frame as using window frame or UIScreen
My problem was I accidentally deleted the value found here:
I added back LaunchScreen, and made sure there was a LaunchScreen.xib. Maybe it will help some others.
Ive had the same problem - black bars at the top and bottom. It was simply solved by setting the drop down in "App Icons and Launch Images" to Main_iPhone:
App Icons and Launch Images Screen Shot
I was facing same problem . I just added launch image and it worked for me.
XCode->Click on Project File -> Select Target-> App Icons and Launch Images -> Add launch image source
This worked!
Pay attention to Step#5 and Step#6 below:
1.In xcode, Click on the Project file in Project Navigator
2.Click General tab
3.Type "Main_iPhone" in the Launch Screen File field
4.Save
5.Remove the app from device or simulator
6.Then in Xcode go to Product Menu and then select Clean
7.Build again

Label displacement for 3.5 inch screen and 4 inch screen

I am developing an iPhone app and I have a few sets of labels which is fetching data from an XML feed. However, initially I designed the app for the iPhone 5 (with the bigger screen) and when I change it to 3.5 inch retina, the labels are displaced as seen in the photos.
iPhone 5 4.0 inch label
http://i.stack.imgur.com/d4LXp.png
iPhone 4 3.5 inch label
http://i.stack.imgur.com/OPNpn.png
Thus when clicking on the toggle button for designing for 3.5 inch and then editing it, then the 4 inch retina design will be displaced. Does anyone know how I can overcome this issue? Thanks. I am obviously using the storyboard to edit the files.
Mikkel, it depends if you are using Autolayout or not. To check if it's enabled, go to the File Inspector (Command+Alt+1) and see if the checkbox Use Autolayout is on or off).
If you are not using Autolayout: you will need to configure the AutoResizing Masks. In order to do so, go to the Size Inspector (Command+Alt+5). Then, for each label, you set the left margin and the top margin as fixed (the red line, not the arrow).
If you are using Autolayout: in the same size inspector, configure correctly the constraints to left and top as fixed, and it should be fine.

How to design single storyboard file that supports all iphone screen sizes?

I am using storyboard and xcode 4.6 for designing Iphone app. I have very complex viewscontrollers and some of the subviews(like scrollview's and autocomplete tablviews) have generated dynamically. When app build for iphone 4 everything works fine. But, when using Iphone(retina-4 inch) simulator, I noticed that there is space at the top and bottom of the screen and also some of the subviews (like scrollviews and autocomplete tableviews ..) misplaced and covering other subviews in that viewcontroller. I tried to search and found some are suggesting to design/load two xib files based on screen size. I have enabled both autoresize masks and autolayout, but still the problem persists.
How to design a single storyboard file that is feasible for both Iphone-4 and Iphone-5.
Reference:How to develop or migrate apps for iPhone 5 screen resolution?
Update attached screenshot:
Storyboard file
Thanks in advance...
use the button in the picture below to toggle between retina 4 in and 3.5 inch. use the autosizing tool under the size inspector on the top right to get views to position themselves correctly.

Xcode Storyboard displaying the new iPhone 5 screen size?

I have the latest version of Xcode. In one of my projects I noticed that the views for the iPhone were the new iPhone 5 screen sizes. I like it but is there a way to switch back to the smaller screen size? Not everyone has the iPhone 5.
Also, when your building your interface, you'll see a small icon that lets you quickly switch between 4" and 3.5" screens. It's the rectangular icon on the left. It toggles back and forth between phone sizes.
There's a size property in the attributes, so you can choose the pre iPhone5 size of 3.5
Update: It's now under Editor->Simulated Screen. It's combined with orientation (portrait vs. landscape).
You can switch between the Form Factors(IPhone 5 and the previous versions) by clicking on Editor->Apply Form Factor