Creating toolbar in UIBuilder
First I created a toolbar in UIBuilder. I could have done it dynamically, but this way I can hook everything up in UI builder. Note because of the way I'm doing this, I can have multiple toolbars in UIbuilder and switch between them.
I hooked the toolbar up to the select picture, and added a new 'add text' window.
For now it's pretty simple, but I will likely expand it, and create better icons later. I add events to my view controller for the various actions.
Changing creation of my classes
I change the creation of my views and variables so that I create a single view when the add button is chosen. In addition I moved the creation of my various collections to viewDidLoad:
NSMutableSet *viewSet=[[NSMutableSet alloc]init];
- (IBAction) addWindow:(id)sender
TextDisplayView *testView=[[TextDisplayView alloc] init];
Intercepting single tap and displaying the toolbar
Next I intercept the single tap and when it arrives check to see if I'm in a view. If so act as previously, otherwise toggle my toolbar. Note that my toolbar has to be set to be at the bottom of the view, otherwise it appears at the top (since it's origin is 0,0).
I modified singleTap to handle this:
- (void) singleTap:(UIView *)subViewTapped
NSLog(@"Received single tap");
// Go ahead and stop.
// existing code.
for (TextDisplayView *view in self.currentViews)