Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

iOS 6 invisible system button

$
0
0

While testing my app (Ti 3.2.1, iOS 7.0.3) for compatibility with iOS 6, I noticed my camera system button wasn't showing properly. It was there, but only visible by its inset shadow. I realized that this is because it's in a Toolbar and iOS 6 toolbars always have a gradient so that buttons will appear inset in the toolbar. Since I just wanted it plain against the white background, I changed the Toolbar to a View. Now I can't see the button at all.

If I remove the backgroundImage: 'none' I had applied to all buttons to remove the weird white button issue, I can see the button there because the white button shape appears. However, the camera icon never appears.

Here is the current state of that section:

<View id="photoToolbar">
    <View layout="horizontal" height="Ti.UI.SIZE" width="Ti.UI.SIZE" left="10">
        <Label id="photoLabel" text="Upload images" />
        <ActivityIndicator id="activityIndicator" />
    </View>
    <Button id="photoButton" onClick="showPhotoOptions" />
</View>
'#photoToolbar': {
    height: Ti.UI.SIZE,
    right: 20,
    tintColor: '#767676',
    top: 10,
    width: Ti.UI.FILL
},
'#photoLabel': {
    color: '#767676'
},
'#activityIndicator': {
    left: 10,
    style: Ti.UI.iPhone.ActivityIndicatorStyle.DARK
},
'#photoButton': {
    color: '#767676',
    right: 10,
    systemButton: Ti.UI.iPhone.SystemButton.CAMERA
}
If I set a background color and a height and width on the button I can see that area, but there is no icon. Setting them to Ti.UI.SIZE has no effect. Shouldn't the height and width be automatic by default?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>