Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi all,

I just want to know how to get a layer/view like what i attached??

How to position Buttons like that (see attached image) ??

Is it customising actionsheet???

About ActionSheet customization
1. I tried overriding drawRect of actionsheet... and am able to give custom color for that.. But how to give custom shape????

2. Is it possible to override the button positions in actionSheet?

3. which all properties for a actionSheet can implement by extending/implementing category?
 

Attachments

  • a.png
    a.png
    17.1 KB · Views: 6,487
Have u got done with custom actionsheet

I too want the same type of custom action sheet with buttons placed horizontally as you shown... I was trying for it very long...Have you got done with this custom actionsheet.
Please help me with your comments and codes(if any)

Thanks,
Brian
 
you can set the number of button rows for an action sheet or alert view, but xcode will issue a warning since it's an undocumented a part of the SDK. the following still worked with SDK 3.0, not sure about 3.1.

Code:
[myAlert setNumberOfRows:1];

apple may remove this functionality in future updates, so consider rolling your own alert view class, which you could also further customize, instead of using apple's.
 
Here's what you can do: Create an action sheet without any buttons by setting the 3 button title settings to nil. For the title, set it something like @"\n\n\n" which will give you some extra space by using line-feeds as the title. Finally, add your custom views (buttons, whatever) with something like [actionSheet addSubview: myButton];
 
you can set the number of button rows for an action sheet or alert view, but xcode will issue a warning since it's an undocumented a part of the SDK. the following still worked with SDK 3.0, not sure about 3.1.
Don't use undocumented SDK methods or classes. Apple has been checking for this sort of thing and can reject apps for it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.