It appears that the problem is due to an API change.
In the example, we use a UIImageView as the "content view" for the app
and add the buttons and textfields as subviews of this UIImageView. In
retrospect, I'm surprised that this ever worked; at the time I was
following an Objective-C example line-by-line. Here is the old
applicationDidFinishLaunching: method:
==============================================================
(- (void)applicationDidFinishLaunching:(id)application is
;; Set up the window and content view
(set screenRect ((UIScreen mainScreen) bounds))
(set @window ((UIWindow alloc) initWithFrame:screenRect))
;; Add the image as the background view
(set anImageView ((UIImageView alloc) initWithFrame:((UIScreen
mainScreen) applicationFrame)))
(anImageView setImage:(UIImage imageNamed:"Background.png"))
(set @contentView anImageView)
(@window addSubview:@contentView)
(self addControlsToContentView:@contentView)
;; Show the window
(@window makeKeyAndVisible)))
==============================================================
In the updated method (below), I create a separate content view as a
UIView and add the button and text field to it. Now those two UI
elements respond to touches.
==============================================================
(- (void)applicationDidFinishLaunching:(id)application is
;; Set up the window and content view
(set screenRect ((UIScreen mainScreen) bounds))
(set @window ((UIWindow alloc) initWithFrame:screenRect))
;; Add the image as the background view
(set anImageView ((UIImageView alloc) initWithFrame:((UIScreen
mainScreen) applicationFrame)))
(anImageView setImage:(UIImage imageNamed:"Background.png"))
(@window addSubview:anImageView)
(set @contentView ((UIView alloc) initWithFrame:((UIScreen
mainScreen) applicationFrame)))
(@window addSubview:@contentView)
(self addControlsToContentView:@contentView)
;; Show the window
(@window makeKeyAndVisible)))
==============================================================
I have an updated Xcode project that builds and runs on the iPhone
(but not the simulator). I'll pull that into a tar file and post it
soon.
Tim
On Tue, Sep 8, 2009 at 7:12 PM, Tim Burks<
timb...@gmail.com> wrote:
>
> OK, I'll build it and look into the problem.