Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
iOS View Class Design Basic
Search
darquro
May 10, 2019
Programming
880
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
iOS View Class Design Basic
Swift愛好会 vol.40
darquro
May 10, 2019
More Decks by darquro
See All by darquro
技術的負債を解消してくための組織づくり
darquro
1
1.1k
Jailbreakと向き合おう
darquro
0
3.1k
ラクマでのSwiftUI導入方針とTips / Rakuma SwiftUI Introduction Policy and Tips
darquro
2
5.7k
Half modal comparision in iOS15
darquro
2
3.1k
2 Years Challenge as Engineering Manager in Rakuma
darquro
0
170
Property Wrappersがもたらす新しいSwiftプログラミング / New Swift programming with Property Wrappers
darquro
3
1.8k
Swift 5 Exclusivity Enforcement
darquro
4
940
SDK連携を用いたAdMob活用法
darquro
1
1.1k
ContributingSwift
darquro
0
120
Other Decks in Programming
See All in Programming
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Domain-Driven Transformation
hschwentner
2
2.3k
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
360
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
ActionController meets Protocol Buffers
sorah
0
530
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
0
140
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
150
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Fireside Chat
paigeccino
43
4.1k
The SEO identity crisis: Don't let AI make you average
varn
0
590
Into the Great Unknown - MozCon
thekraken
41
2.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
Building an army of robots
kneath
307
47k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
550
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Ethics towards AI in product and experience design
skipperchong
2
430
Transcript
Re:valua t ion https://fril.jp/ L ead & Delight User F
irst Ownership Fail Smart J047JFXΫϥεઃܭجຊ .BZ BU4XJGUѪձWPM
.PCJMF&OHJOFFS 3BLVUFO JOD "CPVU.F EBSRVSP :VLJ,VSPEB !EBSRVSP !EBSRVSP
None
ࠓͷςʔϚΛߟ͑ͨཧ༝
5BCMFPG$POUFOUT w 7JFXͷΫϥεઃܭʹ͓͚Δجຊ w ΧελϜ7JFXΛ࡞Δ্Ͱͷ5JQT
ྫ
࣮ํ๏ " 4UPSZCPBSE 7JFX$POUSPMMFS
࣮ํ๏ " 4UPSZCPBSE 7JFX$POUSPMMFS 'BU7JFX$POUSPMMFS # 4UPSZCPBSE 7JFX$POUSPMMFS
9*# 7JFX
"UPNJD%FTJHO
"UPNJD%FTJHO w 6*σβΠϯʹ͓͚Δߟ͑ํ w ύʔπɺίϯϙʔωϯτΛ ࠷খ୯Ґ ݪࢠʣ͔Βߟ͑Δ IUUQBUPNJDEFTJHOCSBEGSPTUDPN
"UPNJD%FTJHO IUUQBUPNJDEFTJHOCSBEGSPTUDPN ݪࢠ ࢠ ༗ػ ςϯϓϨʔτ ϖʔδ
"UPNJD%FTJHO 8BOUFEMZ5FDI#PPL ୈষJ04Ͱ࣮͢Δ"UPNJD%FTJHO IUUQTXXXXBOUFEMZDPNDPNQBOJFTXBOUFEMZQPTU@BSUJDMFT
"UPNJD%FTJHO
"UPNJD%FTJHO "UPNT ʢݪࢠʣ .PMFDVMFT ʢࢠʣ 0SHBOJTNT ʢ༗ػʣ ૹྉࠐΈ
"UPNJD%FTJHO 1BHFT ʢϖʔδʣ 5FNQMBUFT ʢςϯϓϨʔτʣ YYYY YYYY YYYY
YYYY YYYY YYYY YYYY YYYY = YYY YYYYYYYYYYYYYYY YYY YYY YYYYYYYYYYYYYYY
.PMFDVMFTʢࢠʣ .PMFDVMFTʢࢠʣ w 6**NBHF7JFX ݪࢠ ͱ 6*-BCFM ݪࢠ
͕ਫฏʹฒͼɺ ؙ֯ͷઢ ݪࢠ Λ࣋ͭ7JFX 3PVOEFE$PSOFS8JUI*DPO-BCFM
0SHBOJTNTʢ༗ػʣ 0SHBOJTNTʢ༗ػʣ w ෳͷ 3PVOEFE$PSOFS8JUI*DPO-BC FM ࢠ Λ
ஔ͢Δ͜ͱ͕Ͱ͖Δ7JFX
5FNQMBUFTʢςϯϓϨʔτʣ 5FNQMBUFTʢςϯϓϨʔτʣ w Ͳ͜ΛมߋՄೳͱͳΔͷ͔ w ΞΠίϯදࣔඇදࣔɺ৭ w ςΩετ৭ɺαΠζ
w ઢ༗ແɺଠ͞ɺ৭ w എܠ৭ YYY YYY YYY
͜͜·Ͱͷ·ͱΊ
͜͜·Ͱͷ·ͱΊ w 'BU7JFX$POUSPMMFSΛͳͨ͘ΊʹɺΧελϜ7JFXͰ ίʔυ͠Α͏ w "UPNJD%FTJHOΛࢀߟʹ͠ͳ͕Βɺ7JFXΫϥεઃܭ Λߟ͑Α͏
͜͜·Ͱͷ·ͱΊ w ΞϓϦέʔγϣϯΛ࡞Δ্ͰͷҰൠతͳઃܭཧ w ΞʔΩςΫνϟʔ .7$ .71 .77.
$MFBO "SDIJUFDUVSF 3FEVY FUDʜ w σβΠϯύλʔϯ 'BDUPSZ 1SPUPUZQF 4JOHMFUPO 0CTFSWFS FUDʜ
͜͜·Ͱͷ·ͱΊ w ΞϓϦέʔγϣϯΛ࡞Δ্ͰͷҰൠతͳઃܭཧ w ΞʔΩςΫνϟʔ .7$ .71 .77.
$MFBO "SDIJUFDUVSF 3FEVY FUDʜ w σβΠϯύλʔϯ 'BDUPSZ 1SPUPUZQF 4JOHMFUPO 0CTFSWFS FUDʜ ͷ
ΧελϜ7JFXΛ࡞Δ্Ͱͷ5JQT
ᶃ9*#ͰσβΠϯ͢Δ7JFX
ᶃ9*#ͰσβΠϯ͢Δ7JFX extension NibLoadable where Self: UIView { static
var nibName: String { return String(describing: self) } static func loadNib(_ bundle: Bundle? = nil) -> UINib { let bundle = bundle ?? Bundle.main return UINib(nibName: nibName, bundle: bundle) } func loadSubviewFromNib() { let nib = Self.loadNib(Bundle(for: type(of: self))) guard let subview = nib.instantiate(withOwner: self, options: nil).first as? UIView else { return } subviews.forEach { $0.removeFromSuperview() } addSubview(subview) setNeedsUpdateConstraints() } func fitConstraintsSubview() { if let contentView = subviews.first { contentView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ contentView.topAnchor.constraint(equalTo: self.topAnchor), contentView.leftAnchor.constraint(equalTo: self.leftAnchor), contentView.rightAnchor.constraint(equalTo: self.rightAnchor), contentView.bottomAnchor.constraint(equalTo: self.bottomAnchor) ]) } } }
ᶃ9*#ͰσβΠϯ͢Δ7JFX required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder)
setup() } override init(frame: CGRect) { super.init(frame: frame) setup() } override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() setup() } private func setup() { loadSubviewFromNib() } override func updateConstraints() { fitConstraintsContentView() super.updateConstraints() }
ᶄ!*#%FTJHOBCMFɺ!*#*OTQFDUBCMFΛ͏ @IBDesignable final class RoundedCornerWithIconLabel: UIView { @IBInspectable
var cornerRadius: CGFloat = -1 @IBInspectable var borderColor: UIColor = ColorPalette.textGray @IBInspectable var borderWidth: CGFloat = 1 @IBInspectable var text: String = "Label" @IBInspectable var textColor: UIColor = ColorPalette.textGray @IBInspectable var isImageShown: Bool = false @IBInspectable var image: UIImage? @IBInspectable var imageTintColor: UIColor = ColorPalette.textGray
ᶄ!*#%FTJHOBCMFɺ!*#*OTQFDUBCMFΛ͏ @IBInspectable var text: String = "Label" {
didSet { setText(text) } } private func setText(_ value: String) { label.text = value label.sizeToFit() }
ᶅQSFQBSF'PS*OUFSGBDF#VJMEFSΛ͏ required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder)
setup() } override init(frame: CGRect) { super.init(frame: frame) setup() } override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() setup() } private func setup() { loadSubviewFromNib() setCornerRadius(cornerRadius) setBorderColor(borderColor) setBorderWidth(borderWidth) setImageShown(isImageShown) setImage(image) setImageTintColor(imageTintColor) setTextColor(textColor) setText(text) setTextFontSize(textFontSize) }
ᶆMB[ZWBS*OJUJBMJ[BUJPO$MPTVSFΛ͏ @IBDesignable final class ItemDetailItemSalesLabelsContainer: UIView { private
lazy var includeCarriageLabel: UIView = { let label = RoundedCornerWithIconLabel(frame: CGRect(x: 0, y: 0, width: 100, height: 20)) label.labelType = ItemDetailItemSalesLabelType.includeCarriage label.backgroundColor = ColorPalette.lightOrange label.borderWidth = 0 label.isImageShown = true label.image = FLFrilIcon.tagIcon(withSize: 14.0) .image(with: CGSize(width: 14.0, height: 14.0)) .withRenderingMode(.alwaysTemplate) label.imageTintColor = ColorPalette.textWhite label.text = "ૹྉࠐΈ" label.textColor = ColorPalette.textWhite label.setContentHuggingPriority(.defaultHigh, for: .horizontal) return label }()
ᶇ0QUJPO4FUΛ͏ struct ItemDetailItemSalesLabelOptionSet: OptionSet { let rawValue: UInt8
static let includeCarriage = ItemDetailItemSalesLabelOptionSet(rawValue: 1 << 0) static let excludeCarriage = ItemDetailItemSalesLabelOptionSet(rawValue: 1 << 1) static let anonymousCarriage = ItemDetailItemSalesLabelOptionSet(rawValue: 1 << 2) static let nowAvailable = ItemDetailItemSalesLabelOptionSet(rawValue: 1 << 3) } @IBDesignable final class ItemDetailItemSalesLabelsContainer: UIView { var labelSet: ItemDetailItemSalesLabelOptionSet = [] }
͍͞͝ʹ ͷΛҙࣝͨ͠ઃܭͰɺݎ࿚ͳιʔείʔυΛ ࢦ͠·͠ΐ͏
5IBOLZPVGPSMJTUFOJOH