Has any one encountered this already ? I put iAd with the code below in titanium studio and when the app loads in show a white rectangle which is where iAd should go thent it disappears ?
var iads = Ti.UI.iOS.createAdView({ width: 320, top: 100, backgroundColor: 'transparent', zIndex:200 });
t1 = Titanium.UI.createAnimation({bottom:0, duration:750});
iads.addEventListener('load', function(){
iads.animate(t1);
});
Titanium.UI.currentWindow.add(iads);
If you didn't change anything else (like switching to a different Titanium Mobile SDK) then this must have been something between you and Apple. Perhaps something going wrong between their sandbox and your simulator.
Related
I'm developing a React Native app with Expo, and I use expo print to make a PDF file from a HTML document. One of the PDFs that I make, needs to have the landscape orientation, so on Android I use #page { size: landscape } and it works fine, but on IOS, it doesn't. The same thing happens with margins, but it worked on IOS too with this:
const { uri } = await Print.printToFileAsync({
html,
margins: {
left: 20,
top: 20,
right: 20,
bottom: 20
},
});
So I was trying to find if there was a similar option for orientation, and there is, but that option is just for Print.printAsync and not for Print.printToFileAsync, that I use because it returns the URI of the created file, which the other one doesn't do. So is there anything that I can do to make it landscape and get the URI of the document?
I have implemented react-native-maps from here:
https://github.com/airbnb/react-native-maps
It was loading the map, my markers were showing correctly until last week. All of a sudden the map view is just blank now. It's just showing a red border and nothing else.
The only thing I have changed last weekend is the name of my project. I have then tried everything I could find online but it's still not working.
Things I have tried:
1. react-native link
2. Things mentioned in the issue here: https://github.com/airbnb/react-native-maps/issues/118
I have the recommended stylesheet for map
map: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
}
And the render method looks like this:
<MapView
style={ styles.map }
region={this.state.region}
showUserLocation={true}
>
I still see a blank screen. I would really appreciate some help here.
Thank you.
It worked when I killed the current npm process and reset my cache.
I have an iOS app that compiles and works fine with Titanium SDK 5.1.1GA but it would not work correctly with either of 5.1.2 GA or 5.2.0 GA.
The issue is with a scrollView in which events are not being fired with the newer SDKs. It is a lot of code to post all of it. The scrollView is the last of four in a ScrollableView and it is being created like this:
function SettingsView() {
var self = Ti.UI.createScrollView({
width: Ti.UI.FILL,
});
var helpButton = Ti.UI.createButton({
title: "HELP",
width: Ti.UI.FILL,
height: Ti.UI.FILL,
color: "black",
});
self.add(helpButton);
helpButton.addEventListener("click", function(){
Ti.API.info("helpButton> Clicked!!");
});
helpButton.addEventListener("touchstart", function(){
Ti.API.info("helpButton> touchstart!");
});
helpButton.addEventListener("touchend", function(){
Ti.UI.info("helpButton> touchend!");
});
return self;
}
The default animation on the button is working - I can see the color changing as I tap on it - but none of the events are fired.
Elsewhere in the code events on views and buttons are working with the newer SDKs.
I have tried all sorts of things but have not been able to make the events on objects inside that scroll view fire. The only thing that has worked so far is changing the SDK to 5.1.1 or earlier.
I would appreciate any help.
Thank you!
This is a bug, tracked at the Appcelerator JIRA:
https://jira.appcelerator.org/browse/TIMOB-20493
My TextInput is missing inside ScrollView for iOS. It works fine on android.
Included is the sample app using Playground.
https://rnplay.org/apps/KtTZ2g
You could see that android is showing the TextInput, but the iOS's one does not show it.
These kind of bugs is making me crazy...
When using the TextInput, be sure to provide a height:
<TextInput
style={{flex: 1, color: 'black', height:40}}
editable={false}
defaultValue="+"
underlineColorAndroid='#C8C7CC' />
https://rnplay.org/apps/a6i08w
I'm experiencing a ~500ms delay in Safari for iOS when binding the touchstart event to a KineticJS circle object. I've tried calling event.preventDefault() within the on function, thinking that this would override the default iOS behavior, but it made no difference. I'm not sure whether this has anything to do with KineticJS, which is why I left that out of the title (but included it as a tag). Note: there is no delay using the iOS simulator – the delay is only happening on the actual device (iPhone 4). Any ideas?
var stage = new Kinetic.Stage({
container: "container",
width: $(window).width(),
height: $(window).height(),
});
var layer = new Kinetic.Layer();
var circle = new Kinetic.Circle({
x: stage.getWidth() / 2,
y: stage.getHeight() / 2,
radius: 70,
fill: "black",
});
layer.add(circle);
stage.add(layer);
circle.on("touchstart", function() {
this.setFill("red");
layer.draw();
});
There is a ~300ms delay on mobile browsers while the browser waits to see if it's a single or double tap (since double-tap is for zoom).
This can be removed on recent builds of Android devices by using:
<meta name="viewport" content="width=device-width">
However, Mobile Safari doesn't follow this same logic, and there's no way to disable this delay.
You can read more about this here: http://updates.html5rocks.com/2013/12/300ms-tap-delay-gone-away