views:

53

answers:

1

I'm aware some of you may not be familiar with Monotouch, but this could certainly be a general iOS issue rather than a specific Monotouch issue.

I'm recreating an app with similar functionality to the default mail app: UITableview with UIToolbar at bottom

This is a simple recreation of our app. It's a UIView which contains a UITableView and a UIToolbar. It's loaded from a XIB file (which contains accompanying view controller code). This view is a UITabController view (though I'm sure this shouldnt affect things?).

alt text

This has been pushed from a navigation Controller using

controller.PushViewController(inboxItem.Controller, true);

(where inboxItem is a custom object I've made, the Controller property being the inboxItem's view controller).

Pressing the right hand button on the toolbar presents a new modal view (compose new message) - which does its thing and no matter which way its dismissed, upon dismissal, the UIToolbar disappears. However, if I am to click on another tab then click back onto this tab, the Toolbar reappears. Is this a redraw issue?

Am I doing something wrong with the way I'm structuring my app? Or have I happened to stumble across some bizarre iOS/Monotouch bug? (I'm hoping it's for the former - so I can improve my iOS development).

A: 

I solved the problem. Basically, what was happening was when the ModalView was being presented and then dismissed, the toolBar was being moved down by 44 pixels each time.

In my example, the toolBar is placed above a UITabBar, so when the modal view was dismissed the toolbar was being moved out of view. I'm not sure why this is happening but I'll be sure to file appropriate bug reports.

One quick and (very) dirty way around this is to move the toolBar up 44 pixels when displaying the modalview, so that when it is dismissed, it will move it back down to the appropriate position.

Luke