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 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
void main() { | |
debugPaintSizeEnabled = false; | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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 新たなベストスコアを作る(現在のベストスコア: [Int], 今回のスコア: Int) -> [Int] { | |
let 重複なしのベストスコア = Array(Set(現在のベストスコア + [今回のスコア])) | |
return Array( | |
(重複なしのベストスコア + [0, 0]) | |
.sorted(by: >) | |
.prefix(3) | |
) | |
} | |
新たなベストスコアを作る(現在のベストスコア: [], 今回のスコア: 999) |
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 SafariServices | |
import WebKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var webView: WKWebView! | |
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 PencilKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var canvasView: PKCanvasView! | |
private let toolPicker = PKToolPicker() | |
override func 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 MapKit | |
class ViewController: UIViewController { | |
@IBOutlet private weak var mapView: MKMapView! | |
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 CoreLocation | |
class ViewController: UIViewController { | |
@IBOutlet weak var locationLabel: UILabel! | |
private let locationManager = CLLocationManager() | |
override func 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 AVFoundation | |
// [iOS]ボイスレコーダーアプリを作る - Qiita | |
// https://qiita.com/army_sh/items/946aa15263a6d087a99c | |
class ViewController: UIViewController { | |
private enum State { | |
case idle |
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 { | |
@IBOutlet weak var imageView: UIImageView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view. | |
} |
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 tapGestureRecognizer = UITapGestureRecognizer( | |
target: self, | |
action: #selector(ViewController.didTapView) |
NewerOlder