Icon/image over UIButton iPhone - iphone

If I want an image on my UIButton, and I still want to use the default white button. Is it ok to add an image(icon) over some parts of the button?
I have a button with the text 'Show on map' and I want a icon to the right.
Is this the only approach or are there other possibilities? When I add an icon over the button some parts of the button won't be "clickable".
Thanks in advance.

you could create a custom button that has an image the 'icon' and then the rest is transparent and then overlay this button over the standard one and give them the same action.
An easier way would just to be create an image that is the button exactly as you want it and use the 'custom button' style and use this as the backgroundImage.

Related

how to remove the black border in the toggle button when appeared in it is clicked?

enter image description here
I tried to remove that black border that appear when I clicked the toggle button, but I cant find the solution, Im using bootstrap5, please give me a solution
Just use "shadow-none" class on button and it will remove it.

Make Button NOT change title color when pressed

I can't find any other question on how to prevent this, and nothing I've tried is working perfectly.
I want to make it so the title color of the text on my button is ALWAYS white (I will do some other styling to make this look good still).
But, every time I press on the button, the title color changes from white to grey. How can I stop this? Preferably in the storyboard file instead of programmatically.
Images for illustration:
Not pressed:
Pressed:
Select -> Type: Custom in Attributes ispector

Styling button with dynamic text in iOS app

I am not a iOS developer. I am working on designing GUI for an iOS application to be developed using Appcelerator Titanium.
As far as all the other buttons are concerned, they can be provided with a .png image to style them. But this one type of button which has dynamic text, and thus can have width of various sizes as shown in the image below.
The screenshot is from Instagram iOS app. It shows the button in navigation bar named Camera which is the name of the folder from which image being cropped resides. In the app I'm designing for has a button with same functionality.
I just want to know whether it is possible to add custom styling for this particular type of button.
Thanks.
yes you can create a button and set the backgroundImage for the button to be whatever you want
http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Button
third paragraph
You can specify background images for each state, as well as button text and a button icon. On iOS, there are button styles which define appearance for each state, even if no button images are set.
backgroundLeftCap Property
Simple answer: yes you can add custom styling to this button. As for the varying width, the background image will stretch to fill it.

how to display the list of buttons like drop down list for a button in iPhone

i am new to iPhone programming...
can any body help me out please...
in my app i am displaying an image, transparent html page with text about that image and there is audio instead of html text...
in the bottom tool bar i have button 'VIEW".. i want this button to show the 3 (radio or normal) buttons in a list like drop up list(for enable/disable the bgimage, audio, text)...
How to display the list of buttons when i click on VIEW button...
Thank u
iPhone does not have a build in radio list. You need to implement your custom view to make one. You may try to inherit table view to create a selection list. And for the on / off part, you can try UISwitch.

How to display the button transperent in iphone

I am new to iphone development.I have text on the button.I want only test to be displayed and not the button border or color .It should be transparent such that only there is text in view and not the button.It is possible to do that in interface builder?Please help me out. Thanks.
Select "Custom" as the button's type in the inspector. However, I would recommend against such design unless it's really necessary because if a button doesn't look like a button it may be confusing to your users.