Show modal

Hi all

I want to have a modal window to show UIDatePicker, I have searched the documentation and haven’t been able to come up with a way of making this work - does anyone have a method for producing a modal window with a ‘done’ button

Drag a message box onto your layout
Implement the events

iOS is VERY async in order to not tie up the CPU and other high priority functions like phone calls, music etc,

Its why Apple even notes against using the synchronous networking functions - see https://developer.apple.com/library/ios/qa/qa1693/_index.html

Hi Norman

I am a newbie here. How do I add the UIDatePicker control to a message box?

Thanks Chris

Oh wait … sorry … I got that wrong :stuck_out_tongue:
I quickly replied about how to implement a modal message box.

You dont put a date picker on a modal dialog
The date picker behaves some what modally all on its own

I will start again. I have text field for a date. At the moment when you go to that field I using TextField1.isFirstResponder and then Dim v As New DateTimePickerView
Self.BackButtonTitle = “Cancel”
Self.PushTo(v)

However that is a full view and does not look great. Thats why I am looking for a way to display UIDatePicker in a smaller pop up / modal window.

I hope that is more clear.

Chris

Right - I misread what you’d asked for
You cant embed the date picker in a message box
I’m pretty sure you can - with some declares - show a view modally so you could “popup” a view that has the data picker on it
See https://forum.xojo.com/19657-push-a-view-without-a-back-button/p1#p165089