iOS 7 – hidden input accessory view is shown after bannerViewActionShouldBegin:willLeaveApplication: - ios

It's a bit more complex than that, the sequence is:
rotate the device from portrait to landscape back to portrait
wait for an ad to show
tap the ad
hidden accessory view will appear over the ad
I've confirmed it happens after -bannerViewActionShouldBegin:willLeaveApplication: is called.
Has anyone seen this? If so, is there a workaround?

Yes, I have seen it. A partial fix is to set alpha to 0 for the input accessory view in -bannerViewActionDidFinish:. This will at least hide the input accessory view when the ad returns. This problem is supposed to be fixed in iOS 8.

Related

SwiftUI: How to set iPad keyboard type to the equivalent of decimalPad in iOS (small)

I want to know is it possible to access the same style of the keyboard as a decimal pad (.decimalPad) on iOS. Inside the Settings, Face ID & Passcode, an iPad presents a small-sized keyboard (see attached image). Is it because the presented view is small, and the keyboard automatically adjusts according to it?
P.S. Taking a screenshot removes the keyboard from the image.
It is not possible to change the keyboard layout in swiftUI, but you can do it in UIKit.
UIKit
keyboardLayoutGuide
A layout guide that tracks the keyboard’s position in your app’s layout.
https://developer.apple.com/documentation/uikit/uiview/3752221-keyboardlayoutguide/
Sample code
https://developer.apple.com/documentation/uikit/keyboards_and_input/adjusting_your_layout_with_keyboard_layout_guide
WWDC video
https://developer.apple.com/videos/play/wwdc2021/10259/

Sporadic black screen when performing segue in iOS 9.2.1 / XCode 7.2

Upvoters: can you let me know if you've seen this problem as well?
The issue I'm seeing occurs roughly every 1 in 15 times when I try to modally launch a view controller from a button on a certain scene.
This is done with iOS 9.2.1 and XCode 7.2, though it is not clear which versions it happens on. It's not easy to change the iOS version down.
The symptoms are as follows:
The destination view controller is not visible on the phone. Instead, the top bar (the one with the carrier) goes black, and sometimes it flickers so the whole screen is completely black. The launching view controller is visible, but not responsive.
When this happens, I go to the XCode screen and do view debugging. Remarkably, this shows the destination screen, almost as it's supposed to look. The only difference is that one of the views has not done its drawRect, and one of the other views looks all speckled. But of course it does not at all correspond to what the phone is showing.
The cancel button on the destination screen seems to still work, because when I press where it's supposed to be, the app continues to function. If I try to relaunch the screen with the button, it again doesn't work though. So once this has happened, the screen has stopped working for that session and the app needs to be killed and restarted.
There are not many hints, but this information may help:
There's 3 scrollviews containing views on the destination screen. All three child views have their own drawRect. It turns out one of the drawRects is not called when the error occurs, resulting in the grey background being shown. The speckled view does run, but I have no clue why it looks like that in view debugging.
No warnings in XCode. Nothing about NSLayout constraints or presentations overlapping.
Two fields are set on the destination view controller on the prepareForSegue function.
The segue is launched from the times button by way of the storyboard. There's no missing or extra outlet, and it is named correctly for the prepare function to catch it.
The issue is sporadic, but will reliably occur if you launch/cancel many times in a row.
Here are the screen grabs. I won't show you the black screen. It's just black with the carrier and the time.
I've solved it. Checking the memory usage turned out to be quite useful.
The grey area was supposed to be filled by a large background with lines drawn. It turns out the naive implementation of drawBackground causes the memory size to balloon to over 200MB. I replaced it with a CSTiledLayer, and now it takes a few MB instead.

Scroller is not showing in landscape mode in IOS APP

I want to make landscape and portrait mode iOS app. I've designed one page with 3 text boxes and 7 buttons. Text boxes and button are resizing (change width) according to IOS screen size in landscape mode but scroller is not showing in landscape mode. So, some buttons are not showing in landscape mode. Please go through landscape Image and portrait Image links.
Landscape Image : http://www.2shared.com/photo/nButg4eb/landscape.html
Portrait Image: http://www.2shared.com/photo/1PR86npE/Portrait.html
I am new in IOS so, i am facing this type of problem. I request all experts to don't close my question because I am really facing this problem and i need to do complete it today.
I am waiting for your valuable answer.
Thanks!
Shailesh Prajapati
First of all, by default scroller is not always visible. It is visible when you enter your view but then it disappears. What is more it is not best, from user experience point of view, to display them all the time.
So, to indicate to user that "somewhere at the bottom there is something" you can do this two things:
after your view was loaded in - (void) viewDidLoad you can blink with scrolls by using:
[scrollView flashScrollIndicators];
and also you can place your buttons, near the bottom edge, in such a way that half of button will be visible and half will not. That will be indicator to user "hey! there is something there!" (http://imgur.com/P9qzUVC)
if this app for ios 6 or later in that case you can use autolayout otherwise it should be manage your code manually. First check is it portrait or landscape and then manage your text field and button manully according to frame.
Read first these two tutorial for autolayout..
http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
http://www.raywenderlich.com/20897/beginning-auto-layout-part-2-of-2

How to start a landscape iOS app in the correct orientation without rotating?

I'm developing a landscape-only, iPhone-only iOS6+ app and having problems getting the rotation to work as I want it to.
The only supported interface orientations set for the app target are Landscape Left and Right. I only have a single view controller at the moment, with its -supportedInterfaceOrientations method simply returning UIInterfaceOrientationMaskLandscape. The info.plist file does not have the UIInterfaceOrientation key.
What I'd like to happen is that after the launch image disappears and the initial view controller is displayed, it is immediately displayed correctly in the orientation in which the user is holding the device, no animations.
What is happening instead is that if the user holds the phone with the home button on the right, the interface is drawn upside down, and then autorotated to match the device rotation. The phone automatically prefers one landscape mode over the other, and I need it to prefer neither (or at least APPEAR to prefer neither, even if this means the use of trickery is needed.)
This question seems to be asking the same thing, although the use case there is somewhat different, and it's unanswered.
What do I need to do to achieve this?

multiple views in landscape and portrait

I want to implement my app in both landscape and portrait with two different views. When my app in landscape it shows one view and in portrait it shows the second view. It is possible. But when my app is loaded in portrait,it shows the unbutton control in actual place.Then i change orientation to landscape,button changes its position to opposite side and rotate the button so that my button title is also in opposite side. Please help me. And thank you for your helping.
I don't know what you're working with. Maybe this will help you:
http://www.theappcodeblog.com/?p=79
EDIT: updated link - sorry no time to write an inline tut :(

Resources