-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT][#7] 출석체크 코드 입력에 따라 출석버튼 Enabled 변경
## Description - Optional+Extension 추가 : isNil, isNotNil, isEmptyOrNil - textField 입력될 때 마다 버튼 enabled 체크 - 버튼 enabled 값에 따라 configuration 변경
- Loading branch information
Showing
3 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Optional+Extension.swift | ||
// momoIOS | ||
// | ||
// Created by 임수현 on 2023/02/11. | ||
// | ||
|
||
import Foundation | ||
|
||
extension Optional { | ||
var isNil: Bool { | ||
self == nil | ||
} | ||
var isNotNil: Bool { | ||
self != nil | ||
} | ||
} | ||
|
||
extension String? { | ||
var isEmptyOrNil: Bool { | ||
self?.isEmpty == true || self.isNil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters