Custom UIButton with title shadow & selected backgrund image

Discussion in 'iOS Programming' started by yrvaken2, Mar 25, 2009.

  1. yrvaken2 macrumors newbie

    Joined:
    Sep 15, 2008
    #1
    Hello!

    I am doing working on an app with custom UIButtons. I got two questions.

    1) Is it possible to set an offset shadow on the title Text in a Custom button?

    2) The background image I selected for state:"Selected" do not appear after a button is pressed?

    Anyone how can give me a hint in how to solve this two problems?

    Thanks in advance!
     
  2. yrvaken2 thread starter macrumors newbie

    Joined:
    Sep 15, 2008
    #2
    Well, after some more search on internet I found this code which works fine!

    Code:
    		[selected setSelected:NO];
    		[((UIButton*)sender) setSelected:YES];
    		selected = ((UIButton*)sender);
    
    Where selected is a global UIButton

    So just question 1) remaining
     

Share This Page