I have declared UIKit api using public information from apple
documentation.
I wanted to know if it could be possible to implement iphone api using
only objective C-1.0 ?
If some people are interested by my uikit headers please let me
know ...
For now I have protected properties like that :
#ifdef OBJC2
@property(nonatomic) UIWindowLevel windowLevel;
@property(nonatomic,readonly,getter=isKeyWindow) BOOL keyWindow;
#else /* OBJC2 */
// TODO
#endif /* OBJC2 */
I think the problem is more about optional protocol (@optional) and I
tried to replace
it as show below :
#ifdef OBJC2
@protocol UIActionSheetDelegate <NSObject>
@optional
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:
(NSInteger)buttonIndex;
- (void)actionSheetCancel:(UIActionSheet *)actionSheet;
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet;
- (void)didPresentActionSheet:(UIActionSheet *)actionSheet;
- (void)actionSheet:(UIActionSheet *)actionSheet
willDismissWithButtonIndex:(NSInteger)buttonIndex;
- (void)actionSheet:(UIActionSheet *)actionSheet
didDismissWithButtonIndex:(NSInteger)buttonIndex;
@end
#else
@interface NSObject (UIActionSheetDelegate)
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:
(NSInteger)buttonIndex;
- (void)actionSheetCancel:(UIActionSheet *)actionSheet;
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet;
- (void)didPresentActionSheet:(UIActionSheet *)actionSheet;
- (void)actionSheet:(UIActionSheet *)actionSheet
willDismissWithButtonIndex:(NSInteger)buttonIndex;
- (void)actionSheet:(UIActionSheet *)actionSheet
didDismissWithButtonIndex:(NSInteger)buttonIndex;
@end
#endif
but I don't know if it will be enough.
In the worst case I just need to wait for clang to support objc 2.0
and in this case it will be possible
to use properties and optional protocol methods.
So what do you think of uikit for cocotron ?
UIKit relies heavily on CoreAnimation and to some degree WebKit, these
technologies really need to be in place before UIKit can be worked on
effectively.
The most recent compiler update, 2010-02-24, fixes a variety of
property issues, I am going to guess that the compiler will be able to
handle UIKit before CA is in good shape so that is probably not a huge
concern.
Chris