I am writing an app which will step through a bunch of data and when it hits upon a certain condition I would like to display a custom dialog allowing the user to edit some info for the data. I have tried using a modal seque.
However when I run the code it opens all the dialogs at once. It continues to step through the data even if a "modal" dialog is open.
Example:
for x in 1...10 {
print("X is: \(x)")
self.presentAsModalWindow(sheetViewController)
}
This will display 10 windows...it does not act truly modal.
I would like it work like an NSAlert where execution stops till the dialog is dismissed. A NSAlert will not work because I need textbooks and other controls on the modal window.
Does anybody have any ideas how to accomplish this?
Thanks in advance!