Skip to content

Commit 3fd91d3

Browse files
committed
Fixed build warnings
1 parent e20aab4 commit 3fd91d3

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎TOPasscodeViewController/Views/Main/TOPasscodeKeypadView.m‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,13 @@ - (void)setHorizontalLayout:(BOOL)horizontalLayout animated:(BOOL)animated durat
275275
self.horizontalZeroButton.contentAlpha = _horizontalLayout ? 0.0f : 1.0f;
276276

277277
void (^animationBlock)(void) = ^{
278-
self.verticalZeroButton.contentAlpha = _horizontalLayout ? 0.0f : 1.0f;
279-
self.horizontalZeroButton.contentAlpha = _horizontalLayout ? 1.0f : 0.0f;
278+
self.verticalZeroButton.contentAlpha = self.horizontalLayout ? 0.0f : 1.0f;
279+
self.horizontalZeroButton.contentAlpha = self.horizontalLayout ? 1.0f : 0.0f;
280280
};
281281

282282
void (^completionBlock)(BOOL) = ^(BOOL complete) {
283-
self.verticalZeroButton.hidden = _horizontalLayout;
284-
self.horizontalZeroButton.hidden = !_horizontalLayout;
283+
self.verticalZeroButton.hidden = self.horizontalLayout;
284+
self.horizontalZeroButton.hidden = self.horizontalLayout;
285285
};
286286

287287
// Don't animate if not needed

‎TOPasscodeViewController/Views/Shared/TOPasscodeInputField.m‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,10 @@ - (void)resetPasscodeAnimated:(BOOL)animated playImpact:(BOOL)impact
251251
{
252252
[self setPasscode:nil animated:animated];
253253

254-
if (impact) {
254+
// Play a negative impact effect
255+
if (@available(iOS 9.0, *)) {
255256
// https://stackoverflow.com/questions/41444274/how-to-check-if-haptic-engine-uifeedbackgenerator-is-supported
256-
AudioServicesPlaySystemSoundWithCompletion(1521, nil);
257+
if (impact) { AudioServicesPlaySystemSoundWithCompletion(1521, nil); }
257258
}
258259

259260
if (!animated) { return; }

0 commit comments

Comments
 (0)