Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

Dbank daisukenagata

:octocat:
Focusing
View GitHub Profile
@daisukenagata
daisukenagata / AutoOpenTextField.swift
Last active Nov 28, 2021
AutoOpenTextField.swift
View AutoOpenTextField.swift
import SwiftUI
@available(iOS 15.0, *)
struct AutoOpenTextField: View {
@State private var name = ""
@FocusState var isFocused: Bool {
didSet {
DispatchQueue.main.async {
isFocused = true
View welcome.dart
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Welcome to Flutter',
home: new Scaffold(
View Mathematics.swift
import UIKit
class Pointted {
var horizonal: CGPoint
var vertical: CGPoint
init(h: CGPoint, v: CGPoint) {
horizonal = h
vertical = v
}
View Samplem4a.swift
//
// ViewController.swift
// Samplem4a
//
// Created by 永田大祐 on 2021/03/28.
//
import UIKit
import AVFoundation
View Get_DepthData.swift
import UIKit
import AVFoundation
class ViewController: UIViewController, AVCapturePhotoCaptureDelegate {
private var videoPreviewLayer: AVCaptureVideoPreviewLayer?
private var stillImageOutput = AVCapturePhotoOutput()
private var captureSession = AVCaptureSession()
private var capturepDevice: AVCaptureDevice?
private var session: AVCaptureSession?
@daisukenagata
daisukenagata / SimpleDesign_SwiftUI.swift
Last active Mar 22, 2021
SimpleDesign_SwiftUI.swift
View SimpleDesign_SwiftUI.swift
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Color.yellow
.frame(maxWidth: .infinity, maxHeight: .infinity)
VStack {
HStack {
View String_Split.swift
import UIKit
var str = "Hell12o, p3laygrou4.5nd"
var ans = ""
str.forEach { s in
if (s.description.range(of: "[0-9-.]",
options: .regularExpression,
range: nil,
locale: nil) != nil) {
View gist:b7dc924f2ec9ab0105f538083b6350d6
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_0" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
View gist:082955c365f263bd9c17a76d5041153f
func FirebaseAppCrashlytics() {
FirebaseApp.configure()
Crashlytics.crashlytics()
Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true)
let userInfo = [
NSLocalizedDescriptionKey: NSLocalizedString("The request failed.", comment: ""),
NSLocalizedFailureReasonErrorKey: NSLocalizedString("The response returned a 404.", comment: ""),
NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString("Does this page exist?", comment: ""),
View gist:40fa8807833c1206bfd8d9dd77ffb219
import SwiftUI
final class TextModel: ObservableObject {
@Published var roomIndex = Array<String>()
}
struct ContentView: View {
@State private var tag : Int?
@State private var view: AnyView?