UIPageControl for Walkthrough - uikit

I have previously used MyBlurIntroductionView library for presenting walkthroughs of my app but the problem is it is buggy on iPhone X -- the content gets cut off by the notch on iPhone X. The library has not been updated for years so I need something that works on iPhone X. I am not sure if it a problem with setup of UIPageControl. Any inputs to fix it or an alternative library that is better for presenting walk through tutorials on iOS?

Firstly on MYBlurIntroductionView, Launch screen is missing add it by
Xcode-> NewFile-> LaunchScren
Assign it on your target
Output
Since MyBlurIntroductionView is very old source project you have to provide constraints
with respective to safe area(see here)

Related

SwiftUI Preview Canvas Build Fails but Project Build does Not

I am working on a project to add SwiftUI to a legacy app that uses Cocoapods. When I try to run the preview canvas the build fails and the canvas cannot run.
The cause is an issue building one of the included pods in the project (we’ll call this pod ‘LibraryX’). When XCode tries to build LibraryX it encounters a segmentation fault. But when I build the project itself there is no problem building LibraryX and starting the app.
I have tried looking for SwiftUI-preview-specific build settings in the XCode project build settings and have not been able to find anything. I have double checked the build path settings (as in this answer) and also verified that I am building on the correct device (as in this answer). In general, Googling for others who are facing similar issues has not turned up anything like my issue so far.
What I am wondering then is this: Does XCode use different build settings for building the project for use in creating the preview canvas? If so is there some way to configure how the preview canvas build works?
Because LibraryX is proprietary and the SwiftUI view I’m trying to add is simply the default “hello world” view that XCode creates there is not much I can share in the way of code samples for this question.
SwiftUI has still some bugs and is not perfect yet.
The canvas is part of SwiftUI and "shares" some of these bugs.
Sometimes you find yourself in a situation, where (a.) something does not work on Canvas or (b.) does not work correct on the simulator but (c.) works on a real device perfectly.
Most likely everything will get better over time, because SwiftUI is quite new (less then a year old) and Apple is pushing it.
My "solution" for the moment in similar situations is to not rely on canvas and just test on simulator.

Xcode storyboard showing osX object library. I want IOS object library

I develop mainly IOS apps but, recently, I worked on an OSX app. Both are possible with Xcode (I use 8, with swift).
Unfortunately, when I switched back to my already-existing IOS project (after restarting Xcode), the storyboard selection menu for the object library shows only OSX objects, not IOS (e.g. UIImageView).
I have googled without success and tried restarting Xcode, also without success. Can anyone help me fix this?
I did a lot more searching and came up with:
Xcode is loading in OS X objects instead of iOS objects
There there are other solutions proposed but the one that worked for me was to close the assistant editor and then, in the file list ( leftmost window in Xcode 8), I double clicked on the storyboard file. Problem solved. I am surprised that this bug still exists in this latest version...it is very troublesome.

Xcode: Need to lock game to portrait only

I just released a game to the app store and realized I completely forgot to lock it to portrait only. I need to submit an updated version that does just that. At this point, is it enough to just go to general > deployment info and uncheck everything but Portrait and then submit this as a new build? Or do I also need to do something to the code? Please note that it's a swift app.
Simple.
Here's how you do it.
This works for both objective c and swift.
1. Open your project and go do your build settings.
Scroll down to the tab that says Deployment Info.
3. From there you can see a section called Device Orientation, This is where you need to be. Select an orientation like so.
4 Build the project and you are done!
Go to your info.plist file, Supported interface orientations, delete the keys you don't need.
There are two different plist keys for iOS in info.plist for orientation,
Supported Device Orientations
Supported Device Orientations (iPad)
Both of these must have the appropriate key value pairs in the plist.
The basic answer is: yes, that should be sufficient.
However:
Some elements of your application might not adapt well. I know I had problems with the UIImagePickerController for a landscape-only app. So watch out for functionality that you yourself haven't written and how that interacts with the restriction.
If you have code related to orientation (pushing a certain mode etc) it's probably worth testing.
You should make the change and test it before submitting. I think there may be ways of holding the release with Apple until you've had the portrait only one approved.

Xcode - Navigation controller tutorial needed

Does anyone have a good navigation controller tutorial for newer Xcodes that still uses xib file instead of storyboard? I've been searching everywhere, and what I've found either is for Xcode version 2.0 or either uses storyboard.
Check out this: http://www.techotopia.com/index.php/Creating_a_Navigation_based_iOS_5_iPhone_Application_using_TableViews
Should give you the basic idea... Written for iOS 5 though, so some functions might need updating

How do I initialize IKImageView?

I am completely stumped with this one: I'm new to Xcode, coming from Windows. I create a brand new Cocoa app, place an IKImageView in Interface Builder, save and launch the app. Xcode shows the app icon bouncing forever, never launching. If I trace into it I get application crash right away.
I've downloaded examples from Apple but I cannot see how they initialize IKImageView, if that's what I'm failing to do. I've been searching for a solution for hours. Help?
The problem is that you are not including the required frameworks that are used by IKImageView. Just follow the instructions that are found in the Image Kit Programming Guide, in particular the section labeled Using the Image Kit in Xcode and you should have no problems.

Resources