I am running into some problems with one button that I am customizing for my app and I need some help with it. When I test the button with iOS 6 there are no problems with the button transparency and the png image is viewed like this
but when i test my app with iOS 5 the button is not transparent:
I have the following settings for the button:
Thanks in advance for any suggestions of how to solve this problem.
Have you kept Button Type as UIButtonTypeCustom in UIButton Type property
Related
I was trying to find answer to my problem but I couldn't figure it out.
I've imported my own icons to icons assets which are white and in .png format and I want to use them in tab bar item. Everything works great but when the screen is inactive the icon is gray. I want it to be white as original. I've tried to change "render as" in assets but then the icon doesn't change when the screen gets active.
Is there any way to fix it?
Thanks for all help. https://i.stack.imgur.com/mzDl3.png
TRY THIS-:
var image = UIImage(named:"your image")?.withRenderingMode(.alwaysOriginal)
I'm making my first app in Swift and I noticed that when I create UIButtons in the storyboard when selected (highlighted) in the app they only change background if the button is an image.
I was wondering if there is any way in Swift to change that so that even the buttons with no image will change their background to a darker background.
Thanks for the help.
UIButton's default behaviour is to change its background on click.
try dragging a new UIButton on Interface Builder, and run the program without doing any changes to the button.
With your specific button, inspect it in Interface Builder and check that its type is System, otherwise you don't get that default behaviour.
I'm using Xcode 6.1.1
Is it possible to set the background colour in code for the selected/highlighted state for UIButton? - Not a background image!
I'm using ID's for colors (e.g. #"theme.brand.primary") that are linked to a json file i.e. .plist file
I've done it for setTitleColor UIControlStateHighlighted which works fine... example code:
[button setTitleColor:[config getColour:#"button.text.pressed-state"] forState:UIControlStateHighlighted];
However I want the colour of the button to change not the title.
There is no option for setBackgroundColor:forState: ???
Does anyone know if theres a simple way to do this?
Can you not just check for highlighted?
if (myButton.highlighted) {
myButton setBackgroundColor.......
}
I have open-sourced a class, STAButton, to fill this functionality hole. Available under the MIT license. Works for iOS 7+ (I have not tested with older iOS versions).
If anyone could show me how to make a button similar to the one in the image below I would be really grateful!! I intend to use the button in XCode for Iphone/ IPad
I have no experience of this, but did you tried to make a e.g. 50% transparent (.GIF / .BMP) picture and set it as a background of the button?
OK so I solved this now, I set the alpha of my image to 0.7 with the following code
shootButton.alpha = 0.7;
And I also used photoshop's "Satin" effect to give it a more translucent effect.
I have updated the Aviary SDK for iOS 7 compatibility . Previously everything working good but in the iOS 7 I am having the following frame issue . Cancel button and Done buttons are cutting down at the edges and there is some gap from status bar and Aviary present modal view . Any ideas or help would be grateful .
I have found a solution for changing colour for "done" and "apply" button in "AFPhotoEditorController".
select & open "AviarySDKResources.bundle" from your project
open "AviarySDKColors.plist"
open "accentColor"
change value for key "hex" to what you want.
To fix frame dimensions I used
- (void)setPhotoEditorCustomizationOptions
{
[AFPhotoEditorCustomization setUsingIOS6SDK:YES];
}
In IOS 7 they are using Border less navigation bar buttons with text highlight effect,No options to adjust the bar buttons,For Aviary suggesting bar buttons with example IOS 7 screens Layout in the style guide and you can achieve this effects by adjusting bar button color and opacity in Aviary SDK tool.