On Titanium 3.X (+Alloy), I created an iAd View
var iAd = Ti.UI.iOS.createAdView({
width: '100%',
height: 'auto'});
And for each pages called via anOtherPage.open(), I recreate the iAdView.
The problem is that when I enter the new page, the previous iAdView disappears before reappearing. How can I make it so that the iAdView never disappears from a page to an other.
According to Apple Guidelines
A standard banner takes up a small area of the screen and is often
visible for as long as the screen is visible. You choose the app
screens that should display a standard banner and make room for the
banner view in the layout.
check the Reference
Related
I want to have a scrollable (with snap points) react native navigation stack screen(presentation: "modal") in my app. I don't want anything like "react-native-modal" library or official Modal from react native library. I want an actual screen with modal behaviour and I can achieve that with presentation: "modal" property but I want it to have snap points. Perfect example would be the iOS fitness app.
So this is the screen when you initially press upload button. As you can see it takes maybe 40% - 50% height of the screen
If you scroll down height expands and it acts as ordinary screen with presentation: "modal"
And lastly if you scroll back up it springs back to its original position and it acts as a modal(no gap at the top of the screen as in second image)
That is the behaviour I am looking for.
If it is possible I would like to get similar behaviour on android as well.
I tried to implement that behaviour with "react-native-modal" and official Modal from "react-native" components but I want to have it as a separate screen. I also want it to feel "native like" and with these stuff it doesn't feel that way.
You may try this library react-native-simple-bottom-sheet
I just created react native app with expo init, built for Android. When i open app in landscape mode and after turn to portrait, the height of app is half of screen. https://i.stack.imgur.com/kzIlD.jpg
Here is code: https://github.com/catalin935/reactNativeHeightBug/blob/master/App.js
It looks like your view has been initialised with a height, perhaps Dimensions.get('screen').height?
If you want the view to always fill the screen, add flex: 1 to the styles to get it to flex to it's container rather than using height/width values.
Alternatively, you could attach an event listener to Dimensions to listen for the change event and use that to rerender your views although I'd only really recommend that if you want your UI to change depending on the screen ratio/orientation (eg, set a FlatList to use two columns rather than one in landscape mode. I have a small library called react-native-screenutils that may help you with that.
I have defined the image in package.appxmanifest with
<SplashScreen Image="foo.png" BackgroundColor="#000000" />
but is it possible to define alternative image for snapped view?
No, it's not possible.
But you can create "fake splashscreen page" that will be basically your page where you can put display one image for Fullscreen mode and other image for SnapView mode.
Similar behavior uses for instance the Store app where the actual splashscreen is shown only for a second and then you see page with green background, logo and ProgressRing.
I'm having a really hard time making my application work with the new iPhone 5's screen. I can have the layout all set up for the 3.5" screen but when I change it to the 4" everything moves around and then it affects the 3.5". But my biggest issue is my navigation bar moves to the bottom on the screen every time I change the size.
I am using AutoLayout although I'd prefer not to, so I can allow iOS5 users to use my app.
This is what I mean:
The Navigation bar constraints are:
Top, Right, and Left: Superview.
Bottom: Top of the UIImageView below it.
I have a button that moves up to the center of the screen. I also have images around the screen that are animating. When you click on the button in iPad 5.0, it works. However, it doesn't even respond to a click or a "Touch Down" event in 4.3. I noticed it only has this problem when there's something animating on the page. Any ideas?
From UIView Class Reference:
During an animation, user interactions are temporarily disabled for the views being animated. (Prior to iOS 5, user interactions are disabled for the entire application.) If you want users to be able to interact with the views, include the UIViewAnimationOptionAllowUserInteraction constant in the options parameter.