Skip to content

Instantly share code, notes, and snippets.

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