Skip to content

Commit

Permalink
-small bug fix
Browse files Browse the repository at this point in the history
-user info showed null instead of just empty when they were empty in the defaults
  • Loading branch information
MilesCrabbe committed Jun 6, 2014
1 parent c337225 commit 8d51fd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ -(instancetype)init{
return self;
}
-(void)build{
if([[[NSUserDefaults standardUserDefaults] stringForKey:@"cwid"] isEqualToString:@""]||[[NSUserDefaults standardUserDefaults] stringForKey:@"cwid"] ==nil){}
else{
self.firstNameLabel.text=[NSString stringWithFormat:@"First Name: %@",[[NSUserDefaults standardUserDefaults] stringForKey:@"userFirstName"]];

self.lastNameLabel.text=[NSString stringWithFormat:@"Last Name: %@",[[NSUserDefaults standardUserDefaults] stringForKey:@"userLastName"]];
self.cwidLabel.text=[NSString stringWithFormat:@"CWID: %@",[[NSUserDefaults standardUserDefaults] stringForKey:@"cwid"]];
self.emailLabel.text=[NSString stringWithFormat:@"EMAIL: %@",[[NSUserDefaults standardUserDefaults] stringForKey:@"email"]];
self.emailLabel.text=[NSString stringWithFormat:@"Email: %@",[[NSUserDefaults standardUserDefaults] stringForKey:@"email"]];
}
self.myUPImage.image=[UIImage imageNamed:@"UP.jpg"];
self.emailLabel.backgroundColor=[UIColor whiteColor];
self.lastNameLabel.backgroundColor=[UIColor whiteColor];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="First Name:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="m6W-c1-tHF">
<rect key="frame" x="115.00000082594502" y="8" width="185" height="21"/>
<rect key="frame" x="115" y="8" width="185" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Last Name:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cDu-45-d4P">
<rect key="frame" x="115.00000082594502" y="37" width="185" height="21"/>
<rect key="frame" x="115.00000113875787" y="37" width="185" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CWID:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="pOV-nf-aF9">
<rect key="frame" x="115.00000082594502" y="66" width="185" height="21"/>
<rect key="frame" x="115.00000113875787" y="66" width="185" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="EMAIL:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="X9p-Gs-cnO">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Email:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="X9p-Gs-cnO">
<rect key="frame" x="10" y="97" width="289" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
Expand Down

0 comments on commit 8d51fd2

Please sign in to comment.