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
struct Greeting { | |
var name: String { | |
return "도미닉님 안녕하세요" | |
} | |
} | |
var greeting = Greeting() | |
print(greeting.name) |
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
// | |
// ViewController.swift | |
// ExFaceTouchId | |
// | |
// | |
import UIKit | |
import LocalAuthentication | |
class ViewController: UIViewController { |
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
import UIKit | |
import LocalAuthentication | |
class ViewController: UIViewController { | |
@IBOutlet weak var loginButton: UIButton! | |
enum AuthenticationState { | |
case loggedin, loggedout | |
} | |
// ✅ 현재 로그인 상태에 따른 UI 변화 |
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
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { | |
guard let restaurantGrade = RestaurantGrade(rawValue: section) else { | |
return nil | |
} | |
restaurantGradeName = restaurantGrade.getName() | |
return restaurantGradeName | |
} |
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
enum RestaurantGrade: Int { | |
case premium | |
case superBaemin | |
case general | |
func getName() -> String { | |
switch self { | |
case .premium: return "프리미엄" | |
case .superBaemin: return "슈퍼배민" | |
case .general: return "일반" |
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
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { | |
switch section { | |
case 0: | |
return "프리미엄" | |
case 1: | |
return "슈퍼배민" | |
case 2: | |
return "일반" | |
default: | |
return nil |
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
class SmartPhone { | |
let inch: Double | |
init(inch: Double) { | |
self.inch = inch | |
} | |
func call(to: String) { | |
print("calling to \(to)") | |
} |
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
class SmartPhone { | |
let inch: Double | |
init(inch: Double) { | |
self.inch = inch | |
} | |
func call(to: String) { | |
print("calling to \(to)") | |
} |
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
class SmartPhone { | |
let inch: Double | |
let isFolded: Bool = false | |
init(inch: Double) { | |
self.inch = inch | |
} | |
func call(to: String) { | |
print("calling to \(to)") |
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
class SmartPhone { | |
let inch: Double | |
func call(to: String) { | |
print("calling to \(to)") | |
} | |
func showYoutube() { | |
print("Watching Youtube") | |
} | |
} |
NewerOlder