2
0

Fixed crashes related to over-released gesture recognizers.

[FIXED]     Memory warnings caused Master Password to crash due to
            gesture recognizers and an iOS 5 bug.
This commit is contained in:
Maarten Billemont 2012-09-07 23:55:12 +02:00
parent fac419dd94
commit 6f82cf7f15
10 changed files with 12 additions and 89 deletions

2
External/Pearl vendored

@ -1 +1 @@
Subproject commit 76b758a9df0ffa49c0a60360a76564287845c22c
Subproject commit 4ceb992dc59e9d085b241239b63df4754da90de7

View File

@ -99,12 +99,6 @@
return [self.pageVCs objectAtIndex:(vcIndex + 1) % self.pageVCs.count];
}
- (void)viewDidUnload {
[self setPagePositionView:nil];
[super viewDidUnload];
}
- (IBAction)exit {
[self dismissViewControllerAnimated:YES completion:nil];

View File

@ -48,13 +48,6 @@
[super viewWillDisappear:animated];
}
- (void)viewDidUnload {
[self setScrollView:nil];
[self setPageControl:nil];
[super viewDidUnload];
}
- (IBAction)close {
[self.presentingViewController dismissModalViewControllerAnimated:YES];

View File

@ -16,6 +16,8 @@
@property (assign, nonatomic) BOOL siteInfoHidden;
@property (strong, nonatomic) MPElementEntity *activeElement;
@property (strong, nonatomic) IBOutlet MPSearchDelegate *searchDelegate;
@property (strong, nonatomic) IBOutlet UIPanGestureRecognizer *pullDownGesture;
@property (strong, nonatomic) IBOutlet UIPanGestureRecognizer *pullUpGesture;
@property (weak, nonatomic) IBOutlet UITextField *contentField;
@property (weak, nonatomic) IBOutlet UIButton *typeButton;
@property (weak, nonatomic) IBOutlet UIWebView *helpView;

View File

@ -17,6 +17,8 @@
@synthesize siteInfoHidden = _siteInfoHidden;
@synthesize activeElement = _activeElement;
@synthesize searchDelegate = _searchDelegate;
@synthesize pullDownGesture = _pullDownGesture;
@synthesize pullUpGesture = _pullUpGesture;
@synthesize typeButton = _typeButton;
@synthesize helpView = _helpView;
@synthesize siteName = _siteName;
@ -211,43 +213,6 @@
[super viewWillDisappear:animated];
}
- (void)viewDidUnload {
[self setContentField:nil];
[self setTypeButton:nil];
[self setHelpView:nil];
[self setSiteName:nil];
[self setPasswordCounter:nil];
[self setPasswordIncrementer:nil];
[self setPasswordEdit:nil];
[self setPasswordUpgrade:nil];
[self setContentContainer:nil];
[self setHelpContainer:nil];
[self setContentTipContainer:nil];
[self setAlertContainer:nil];
[self setAlertTitle:nil];
[self setAlertBody:nil];
[self setContentTipBody:nil];
[self setToolTipEditIcon:nil];
[self setSearchTipContainer:nil];
[self setActionsTipContainer:nil];
[self setTypeTipContainer:nil];
[self setToolTipContainer:nil];
[self setToolTipBody:nil];
[self setDisplayContainer:nil];
[self setLoginNameField:nil];
[self setLoginNameTipContainer:nil];
[self setLoginNameTipBody:nil];
[self setLoginNameContainer:nil];
[self setPasswordUser:nil];
[self setOutdatedAlertContainer:nil];
[self setOutdatedAlertCloseButton:nil];
[self setOutdatedAlertBack:nil];
[self setPullUpView:nil];
[self setPullDownView:nil];
[super viewDidUnload];
}
- (void)updateAnimated:(BOOL)animated {
if (animated) {

View File

@ -91,18 +91,6 @@
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
- (void)viewDidUnload {
[self setAvatarsView:nil];
[self setAvatarTemplate:nil];
[self setAvatarsView:nil];
[self setSavePasswordSwitch:nil];
[self setExportCell:nil];
[self setChangeMPCell:nil];
[self setDefaultTypeLabel:nil];
[super viewDidUnload];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"MP_ChooseType"])

View File

@ -30,7 +30,7 @@
- (id)init {
if (!([super init]))
if (!(self = [super init]))
return nil;
self.dateFormatter = [NSDateFormatter new];

View File

@ -140,9 +140,4 @@
}
}
- (void)viewDidUnload {
[self setRecommendedTipContainer:nil];
[super viewDidUnload];
}
@end

View File

@ -169,26 +169,6 @@
[super viewDidLoad];
}
- (void)viewDidUnload {
[self setSpinner:nil];
[self setPasswordField:nil];
[self setPasswordView:nil];
[self setAvatarsView:nil];
[self setNameLabel:nil];
[self setAvatarTemplate:nil];
[self setTip:nil];
[self setPasswordTipView:nil];
[self setPasswordTipLabel:nil];
[self setTargetedUserActionGesture:nil];
[self setWordWall:nil];
[self setCreatePasswordTipView:nil];
[self setPasswordFieldLabel:nil];
[self setLoadingUsersIndicator:nil];
[self setUiContainer:nil];
[super viewDidUnload];
}
- (void)viewWillAppear:(BOOL)animated {
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2549" systemVersion="12B19" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="KZF-fe-y9n">
<dependencies>
<deployment defaultVersion="1296" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1498"/>
</dependencies>
<scenes>
@ -923,7 +924,9 @@ L4m3P4sSw0rD</string>
<outlet property="passwordIncrementer" destination="jec-mu-nPt" id="i9B-lX-zzX"/>
<outlet property="passwordUpgrade" destination="zbY-EJ-Yiu" id="KAX-Wk-DC4"/>
<outlet property="passwordUser" destination="TZ0-1K-Vvw" id="QCC-Ne-qYv"/>
<outlet property="pullDownGesture" destination="O19-XO-q6s" id="Hb1-fJ-96l"/>
<outlet property="pullDownView" destination="qgs-1p-CRh" id="XWn-9h-aYM"/>
<outlet property="pullUpGesture" destination="D0R-Cc-rG7" id="v3L-Nf-bIC"/>
<outlet property="pullUpView" destination="dId-fW-MRd" id="JED-fJ-VfH"/>
<outlet property="searchDisplayController" destination="P8c-gf-nN3" id="CLs-YI-7NC"/>
<outlet property="searchTipContainer" destination="zOR-Du-qRL" id="X7h-Vh-iCE"/>
@ -2140,6 +2143,7 @@ You could use the word wall for inspiration in finding a memorable master passw
<relationship kind="action" name="closeAlert"/>
<relationship kind="action" name="closeOutdatedAlert"/>
<relationship kind="action" name="copyContent"/>
<relationship kind="action" name="copyLoginName:" candidateClass="UITapGestureRecognizer"/>
<relationship kind="action" name="editLoginName:" candidateClass="UILongPressGestureRecognizer"/>
<relationship kind="action" name="editPassword"/>
<relationship kind="action" name="incrementPasswordCounter"/>
@ -2173,7 +2177,9 @@ You could use the word wall for inspiration in finding a memorable master passw
<relationship kind="outlet" name="passwordIncrementer" candidateClass="UIButton"/>
<relationship kind="outlet" name="passwordUpgrade" candidateClass="UIButton"/>
<relationship kind="outlet" name="passwordUser" candidateClass="UIButton"/>
<relationship kind="outlet" name="pullDownGesture" candidateClass="UIPanGestureRecognizer"/>
<relationship kind="outlet" name="pullDownView" candidateClass="UIImageView"/>
<relationship kind="outlet" name="pullUpGesture" candidateClass="UIPanGestureRecognizer"/>
<relationship kind="outlet" name="pullUpView" candidateClass="UIImageView"/>
<relationship kind="outlet" name="searchDelegate" candidateClass="MPSearchDelegate"/>
<relationship kind="outlet" name="searchTipContainer" candidateClass="UIView"/>