Cancel button from UIActionSheet doesn't appear after long press on phone number in UITextView - ios

I have a problem with the devices that have less then 4 inch display. When pressing long tap on phone number in UITextView, the UIActionSheet that appears doesn't show the Cancel button. The issue is that the actionSheet does showInView, instead of showFromTabBar.
In a demo app, this issue doesn't reproduce. Need help!

Check that the option 'Full Screen at Launch' is checked on the Window in you MainWindow.xib.
I had a similar problem and others when updating for iPhone 5 screen. Apparently the 'Simulated metrics' of Window will be the actual metrics when launching (provided you have not checked 'Full Screen at Launch').
Apple actually has a Note about it in the UIWindow Class Reference:
... If you choose to create a window in Interface Builder, be sure to select the Full Screen at Launch option in the Attributes inspector so that the window is sized appropriately for the current device. ...

Related

My main.storyboard is not showing up on Xcode

So here are the steps that I do when opening Xcode to make a basic application. I first click on "create a new Xcode project" then I tap on "single view app" for "ios" then I fill out the information such as the name of the app and if I want to use core data etc.. and when I finish and tap on "create" I see no main.storyboard on the left side navigation panel... I do not know if I am doing something right. I initially did everything on the LaunchScreen.storyboard, but when I did something it did not allow me because something called segues..
Select Storyboard in User Interface as shown in the image
Please, select storyboard instead of SwiftUI, as with XCODE 11 by default the value of User Interface is set to SwiftUI and it doesn't include storyboard.

Swift: Touch not immediately registered for UIButtons located at bottom of UIViewController

I run into a strange behaviour I am not able to solve. If I place a UIButton at the bottom of the UIViewController of the Main Storyboard, touching it is not immediately registered. It takes about 0.5 seconds till the touch gets registered. You can see than from standard UIButtons when they change the text color. I don't have this issue with buttons anywhere else in the UIViewController.
All I did is adding a Vertical Stack View with 15 UIButtons to the Main View Controller of a new App. When I execute the App on an iPhone 6 or iPhone 8 (the actual devices), the lowest button behaves differently. Touching it doesn't change the text color immediately, while it does for all the other buttons.
Did anyone experience the same issue? Is there a way to solve this or did I just find a bug in the framework? I'm using Xcode 9.2 and deployment target is iOS 11.2.
Go to AppDelegate and try adding:
for gesture in self.window.gestureRecognizers {
gesture.delaysTouchesBegan = NO;
}
It will stop the system from checking to see if you are trying to open control centre.

Xcode shows two windows side by side

Hello My xcode is showing the screen in half and also not showing storyboard interface builder. below is the screenshot
I have tried to reset the xcode settings as well
defaults delete com.apple.dt.Xcode
But it didn't work. Please tell me how can I fix this
These three buttons up here switch your view. Select the left one.
You're actually stuck in the version editor (which looks at your version repository compared with your current code.)
Because storyboard UI can't be viewed with the interface, it shows the underlying xml.
Also the keyboard shortcut is command + enter (credit to farzadshbfn)
Try click on "Show Standard Editor" button:
Main Storyboard > Right click > Open As > interface Builder - Storyboard
Click First button to show your view controller.

why storyboard ui elements not showing on UIViewController in xcode 6?

I am new to IOS development. I am developing an app for IOS 8 devices. I used storyboard for my design yesterday my storyboard showing all UI design but today morning it show blank UIViewController no UI element vision please see in screen shot and very strange thing is that when i run my app all ui element visible in my device. I google but dont find any solution please help me out. Thank you in advance.
It looks to me like you are using size class and you went into a particular size class and added these views. Now you are back in Any size class, so the views are not there (that is why they are greyed out in the document outline at the left). They are available only for that particular size class. If you switch back to it again, whatever it was, you will see them again. Basically, you have created conditional views - the condition being that they are present only when that particular size class situation is the case.
In other words, if you want your layout to apply in the general case, you want to start by creating and editing it under Any size classes. Only then do you switch to a particular size class and modify the layout for that particular size class.
when i run my app all ui element visible in my device
Yes, because on your device the particular size class situation matches the size class you were editing when you added those views. So there they are. That seems to me to prove my guess is right.
I have the same issue while copy a ViewController to another storyboard.
Fixed by following steps:
1: Select the viewController
2: Click on 5th Tab
3: Set the simulated size to Fixed.
Select install:
Since all components [like label,textfield,buttons] are in disable mode, one select Installed check mark its will be enable again adjust constrain accordingly.
The size must be the same, in all xcode storyboard
In my case, it was due to me setting alpha to 0.0 and forgetting it.

iOS 7: keyboard shows in UIKeyboardAppearanceLight when an app is opening from multitasking screen

I've noticed an issue with the keyboard in ios 7, and I'm not sure if I'm doing something wrong.
Here's a simple scenario which replicates the issue on a blank xcode 5 project:
When you tap on a textfield added using interface builder (with keyboard appearance set to dark), the correct (dark) keyboard appears.
If you then resign the responder (add a button or something for that) > press the home button to get to home screen > double press the homebutton to get to the multitasking selection screen > tap on the app > tap on the textfield > it shows up the Light keyboard for a second, and then it draws the dark keyboard.
So is this an iOS bug or could it be something on my end?

Resources