Permalink
Browse files

Xcode 4.2b6 ARC migration assistent

  • Loading branch information...
1 parent 0d9127c commit bb2def2e771446f513efbdfd8663e54a40a76398 @jk committed Aug 30, 2011
Showing with 4 additions and 10 deletions.
  1. +2 −2 JKAlertPrompt.h
  2. +0 −6 JKAlertPrompt.m
  3. +2 −2 NSDateAdditions.m
View
@@ -13,8 +13,8 @@
@interface JKAlertPrompt : UIAlertView {
UITextField *textField;
}
-@property (nonatomic, retain) UITextField *textField;
-@property (readonly) NSString *enteredText;
+@property (nonatomic, strong) UITextField *textField;
+@property (unsafe_unretained, readonly) NSString *enteredText;
-(id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate
cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okButtonTitle placeholderText:(NSString *)placeholderText;
View
@@ -28,7 +28,6 @@ -(id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)de
self.textField.autocorrectionType = UITextAutocorrectionTypeNo;
self.textField.keyboardType = UIKeyboardTypeEmailAddress;
self.textField.placeholder = placeholderText;
- [theTextField release];
CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, 130.0);
[self setTransform:translate];
}
@@ -44,11 +43,6 @@ -(NSString *)enteredText {
return textField.text;
}
-- (void) dealloc
-{
- [textField release];
- [super dealloc];
-}
@end
View
@@ -19,7 +19,7 @@
@implementation NSDate (JKAdditions)
+ (NSDate*)dateWithToday {
- NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] autorelease];
+ NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"yyyy-d-M";
NSString* time = [formatter stringFromDate:[NSDate date]];
@@ -28,7 +28,7 @@ + (NSDate*)dateWithToday {
}
- (NSDate*)dateAtMidnight {
- NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] autorelease];
+ NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"yyyy-d-M";
NSString* time = [formatter stringFromDate:self];

0 comments on commit bb2def2

Please sign in to comment.