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 | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
//基本ラベル例文 | |
let basicLabel = UILabel() | |
basicLabel.frame = CGRect(x: 50, y: 50, width: 200, height: 40) |
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 | |
class ViewController: UIViewController { | |
let tapLabel = UILabel() | |
let tapLabelTag = 1 | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
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 | |
class ViewController: UIViewController,UITableViewDelegate, UITableViewDataSource { | |
//テーブルビューインスタンス | |
private var myTableView: UITableView! | |
//テーブルビューに表示する配列 | |
private var myItems: NSArray = [] | |
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 | |
class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { | |
// Tableに表示する文字列 | |
private var fruitItems: NSArray! = [] | |
private var vegetableItems: NSArray! = [] | |
// Sectionのタイトル | |
private var sectionTitle: NSArray! = [] |
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 | |
class ViewController: UIViewController{ | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
//現在の時間を取得 | |
let date = Date() | |
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 | |
class ViewController: UIViewController, UITextFieldDelegate { | |
private var myTextField: UITextField! | |
private var myLabel: UILabel! | |
private var myButton: UIButton! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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 Speech | |
class ViewController: UIViewController, SFSpeechRecognizerDelegate { | |
// MARK: Properties | |
//localeのidentifierに言語を指定、。日本語はja-JP,英語はen-US | |
private let speechRecognizer = SFSpeechRecognizer(locale: Locale(identifier: "ja-JP"))! | |
private var recognitionRequest: SFSpeechAudioBufferRecognitionRequest? | |
private var recognitionTask: SFSpeechRecognitionTask? |
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 UserNotifications | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
//通知の許可を出す | |
let center = UNUserNotificationCenter.current() |
OlderNewer