Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOS13 SDK による 全機能置き換え

notoroid
September 28, 2019

iOS13 SDK による 全機能置き換え

Objective-C + Storyboard

notoroid

September 28, 2019
Tweet

More Decks by notoroid

Other Decks in Programming

Transcript

  1. (MPSJPVT#BUUFSZ άϩϦΞεόοςϦʔ w όοςϦʔϞχλʔ ϢʔςΟϦςΟʔ  w ࠷େ୆ ࣮ػ ϦϞʔτ୆

     w ख࣋ͪͷJ1IPOF͔ΒJ1BEͳͲͷػثͷόο ςϦʔঢ়ଶ֬ೝՄೳ w ࣗ୐ʹ͋ΔJ1IPOFͷόοςϦʔঢ়ଶ֬ೝՄ ೳ
  2. όʔδϣϯ͸ٕज़σϞ w  όοςϦʔ৘ใ ࣮ػɺϦϞʔτ ͷදࣔ w  όοςϦʔঢ়ଶͷૹ৴ w

     ϦϞʔτઌόοςϦʔঢ়ଶͷड৴ w  ট଴23ίʔυͷੜ੒ͱදࣔ w  ট଴23ίʔυͷಡΈऔΓ ϦϞʔτઌͱ઀ଓ  w  ৭ςʔϚͷબ୒ w  όοΫάϥ΢ϯυಈ࡞ όοςϦʔ৘ใͷૹड৴  w  όοςϦʔϩάͷه࿥ w  όοςϦʔϩάʹج͍ͮͨཤྺͷදࣔ w  όοςϦʔ௿Լ࣌ͷ௨஌ػೳ w  ඇফඅܕΞϓϦ಺՝ۚͷ࣮૷ w  ϩʔΧϥΠζػೳ w 'JSFCBTF ݱࡏͷ'JSFCBTF 3FBMUJNF%BUBCBTF ͷٕज़σϞ w $PSF*NBHF 23$PEF  w *O"QQ1VSDIBTF ඇফඅܕΞϓϦ಺՝ۚ  w όοΫάϥ΢ϯυߋ৽ w ϩʔΧϥΠζ
  3. import SwiftUI struct ContentView: View { var body: some View

    { Text("Hello World") } } #if DEBUG struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } #endif 4XJGU6*ͷςϯϓϨʔτίʔυ 7JFX͸CPEZͰͭͷ7JFXΛ೿ੜ ͨ͠એݴΛ౉͢ඞཁ͕͋Δɻ
  4. RadialGradient(gradient: .init(colors: [Self.gradientStart, Self.gradientEnd]), center: .init(x: 0.5, y: 0.5), startRadius:

    50, endRadius: 150) .aspectRatio(contentMode: .fill) static let gradientStart = Color(red: 102.0 / 255, green: 196.0 / 255, blue: 66.0 / 255) static let gradientEnd = Color(red: 87.0 / 255, green: 161.0 / 255, blue: 58.0 / 255) // .previewDevice(PreviewDevice(rawValue: "iPhone 8") ) .previewDevice(PreviewDevice(rawValue: "iPhone X") )
  5. import SwiftUI struct GraphView: View { var body: some View

    { HStack(spacing:0) { ForEach(0 ..< 12) { item in GraphLineView() } Spacer() } } } #if DEBUG struct GraphVioew_Previews: PreviewProvider { static var previews: some View { GraphView() // .previewDevice(PreviewDevice(rawValue: "iPhone 8") ) .previewDevice(PreviewDevice(rawValue: "iPhone X") ) } } #endif struct GraphLineView: View { var body: some View { ZStack { // Rectangle() // .foregroundColor(Color.green) ForEach(0 ..< 12 ) { item in GeometryReader { geometry in Path { path in let verticalOffset = 0.5 + (item == 0 ? 0 : (geometry.size.height * 0.2)) path.move( to: CGPoint( x: 0.5 + CGFloat(item) * 2.5, y: verticalOffset ) ) path.addLine( to: CGPoint( x: 0.5 + CGFloat(item) * 2.5, y: 0.5 + geometry.size.height ) ) } .stroke(Self.strokeColor, lineWidth: 1) } } }.frame(width:29.5, height:20) } static let strokeColor = Color(white: 1, opacity: 0.8) }