[MonoTouch] UIActionSheet 'Presenting action sheet clipped by its superview' warning

Dan mt_forums at ibase.plus.com
Wed Oct 12 10:49:26 EDT 2011


Thanks for the pointer. Finally went with:

UITabBarController tbc =
(UITabBarController)this.NavigationController.ParentViewController;
aSheet.ShowFromTabBar(tbc.TabBar);


Nic Wise wrote:
> 
> self.ParentViewController
> 
> if (ParentViewController is UITabViewController)
> 
> etc :)
> 
> or just pass it in.
> 
> On Wed, Oct 12, 2011 at 15:04, Dan <mt_forums at .plus> wrote:
>> Hi Nic - thanks for posting a reply.
>>
>>
>>
>>> If it's just window -> myviewcontroller, you can most likely ignore
>>> it. Also, if you can you use all buttons, esp the bottom ones, then
>>> you should be ok.
>>>
>>
>> It is, and all the buttons work fine, but being new to MT I wasn't sure
>> how
>> advisable it was to ignore warnings like this.
>>
>>
>>
>>> the problem arrises if you have a view who's parent is a tabbar
>>> controller, and you use the view to show a sheet. Usually, the tab bar
>>> area (bottom 40-odd pixels I think) block the action sheet, so you
>>> can't touch the bottom buttons, even tho they appear on top of the tab
>>> bar.
>>>
>>
>> Funny you should say that, as this is exactly where I'm now at with
>> trying
>> to use UIActionSheet in a more 'real world' scenario. I have
>>
>> UITabBar -> UINavigationController -> UIViewController
>>
>> and need to show a sheet in the UIViewController using ShowFromTabBar(),
>> but
>> I'm not sure how to get a reference to the UITabBar which is in a
>> different
>> XIB.
>>
>>
>> --
>> View this message in context:
>> http://monotouch.2284126.n4.nabble.com/UIActionSheet-Presenting-action-sheet-clipped-by-its-superview-warning-tp3897607p3898083.html
>> Sent from the MonoTouch mailing list archive at Nabble.com.
>> _______________________________________________
>> MonoTouch mailing list
>> MonoTouch at .ximian
>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
> 
> 
> 
> -- 
> Nic Wise
> t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
> b. http://www.fastchicken.co.nz/
> 
> Nearest Bus: find when the next bus is coming to your stop.
> http://goo.gl/Vcz1p
> mobileAgent (for FreeAgent): get your accounts in your pocket.
> http://goo.gl/IuBU
> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
> London Bike App: Find the nearest Boris Bike, and get riding!
> http://goo.gl/Icp2
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at .ximian
> http://lists.ximian.com/mailman/listinfo/monotouch
> 


--
View this message in context: http://monotouch.2284126.n4.nabble.com/UIActionSheet-Presenting-action-sheet-clipped-by-its-superview-warning-tp3897607p3898244.html
Sent from the MonoTouch mailing list archive at Nabble.com.


More information about the MonoTouch mailing list