iOS Navigation Bar and UIAutomation - ios

I've run into an annoying problem - we use accessibilityIdentifier along with Appium to test our cross-platform apps but, very oddly, the navigation bar in our iOS app just will NOT let its components' accessibilityIdentifier be modified. I seen that some people have work-arounds that involve simply replacing the title label and various buttons or just creating their own navigation bar equivalents, but that seems a little overkill. Has anyone found a solution to this? Does Apple have a stance on whether or not this is a bug?

Related

React Navigation Stack Navigator default shadow styling

I'm using React Navigation to construct a tab bar based type of an app in ReactNative.
"react-native": "0.44.0",
"react-navigation": "^1.0.0-beta.9",
I've got the navigation part pinned down and working. But with regards to styling I'm seeing a shadow on the StackNavigator (navigation controller) inside tab bar. Refer image below.
I'm not used to seeing this kind of a shadow on native iOS apps (I'm an iOS mobile dev trying out RN)
upon further investigation I saw that there are 'shadow' properties specified in 'Card.js' in ReactNavigation. So I manage to fixed the issue by passing in some overriding cardStyle like so
cardStyle: { shadowColor: 'transparent' }
Given all the above, I have two questions
Question 1
Why is this the default behaviour/styling?
To debug the issue, I decided to do a quick view debugging in Xcode and found that 'shadow' does not show up in there.
Question 2
Why is this happening?. Since RN app is essentially a native app (native iOS in this instance), isn't view debugging a reliable way to debug these kind of view related issues?

ios Navigation Bar Usage

Is it acceptable (i.e., to App Store) to have buttons in a UINavigationBar change on-the-fly? For example, perhaps there are two buttons on the Nav Bar for + (Add) and Trash (Delete), but once the + has been touched (for adding an item) the buttons change to Cancel/Save?
A related question, assuming it is acceptable, is whether it is preferable to activate/deactivate buttons as required, or whether it would be better better to make buttons that are not relevant to the operation underway simply disappear to be replaced by those which are relevant at any given time?
Not sure I've made myself clear here, but I haven't seen anything on this in the HIG. Thx.
I don't think there's anything wrong with changing buttons on UINavigationBar. I even have an app published to AppStore (and many other apps too) implementing such feature and Apple's ok with that.

UIKit - Place own statusbar above UINavigationController

My app is in landscape and uses a UINavigationController as its RootViewController. My goal with it is:
Disable the normal iOS StatusBar ( I know how to do that and already did it )
Have a semi-transparent StatusBar (a view) above the UINavigationBar, so that I can show custom information on it
Parts of the content of my main view must be visible underneath my custom StatusBar (exactly like it works with the normal UIStatusBar, just that I don't want the clock and battery and want to show my own information on it)
How can I best achieve this?
A quick search on GitHub gave me multiple libraries that offer the exact functionality you are looking for.
MTStatusBarOverlay
KGStatusBar
CWStatusBarNotification
FDStatusBarNotifierView
BWStatusBarOverlay
WTStatusBar
TWStatus
Try them out, test them and see which one is best for you.
If none of them are good enough, you should get an idea on how to achieve this functionality using the source code those libraries provide.
iOS 7 Human Interface Design, page 143 says:
Don’t create a custom status bar. Users depend on the consistency of
the system-provided status bar. Although you might hide the status bar
in your app, it’s not appropriate to create custom UI that takes its
place.
iOS Human Interface Guidelines

Is there a way to force an iOS6 app to use iOS7 style controls?

I have an app which has had its UI designed for iOS7. Specifically, the UINavigationBar should have the "flat" look. In iOS6, the appearance is very different. Is there an easy way to make it retain the style of iOS7, or do I have to customize the bar?
You have to fake the iOS7 appearance by theming the controls in the app. You won't be able to get things like the blurs without a lot of effort, but the navigation bars and buttons are all pretty simple images so easy to replicate.
Strongly consider not supporting iOS6 at all though. There is a lot of difference between the two systems and you will burn a lot of time supporting a shrinking portion of probably non-active customers. Everyone that can run iOS6 can run iOS7. If they don't care enough to update their phone, they aren't going to care enough to download your app.

Can we develop a custom UITababar?

Is this possible for us to customize the UITabbar as it is in the attached image for an iPAd App?
My App is only meant for Landscape orientation..
Will apple allow this?
I know that this same can be done using a UIToolbar and having tab like buttons. Since the number of tabs I will have in my app is around 5, I can not think of implementing them in a single view using UIToolbar.
I came to know that even if this kind customization is done, Apple will not approve the App.
I have actually used UIView to place different UIButtons in them and produce similar effects as that of UITabbar.

Resources