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
SwiftTweaks
Search
Sho Ikeda
May 25, 2016
Programming
680
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SwiftTweaks
関西モバイルアプリ研究会 #14での発表資料です #関モバ
http://kanmoba.connpass.com/event/31750/
Sho Ikeda
May 25, 2016
More Decks by Sho Ikeda
See All by Sho Ikeda
大規模アプリにおけるXcode Previews実用化までの道のり
ikesyo
0
31k
Package Traits
ikesyo
2
1.7k
Open Source Swift Workshop - Foundation and first party libraries
ikesyo
0
3.4k
Renovateで実現するライブラリの自動更新生活 / Automated Library Updates with Renovate
ikesyo
3
740
XcodeのDevelopment Assets探訪
ikesyo
1
1.5k
RenovateによるiOSライブラリーの自動更新
ikesyo
2
4.1k
2019年のSwiftモック事情
ikesyo
3
8.7k
5分でわかる!Xcode 11から使えるXCFrameworks
ikesyo
2
4.1k
Travis CIのBuild Matrixを活用して、Swift製ライブラリをLinux対応させる
ikesyo
3
2.7k
Other Decks in Programming
See All in Programming
Java 27新機能 / Java 27 new features
kishida
2
180
setup-vp GitLab対応の裏側
naokihaba
0
140
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
180
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
160
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
290
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
210
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
220
The Rails Doctrine Decade
koic
2
400
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.5k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
700
AHC070解法紹介
eijirou
0
140
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
530
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
450
Ruling the World: When Life Gets Gamed
codingconduct
0
370
Evolving SEO for Evolving Search Engines
ryanjones
0
300
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Color Theory Basics | Prateek | Gurzu
gurzu
1
480
Embracing the Ebb and Flow
colly
88
5.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
570
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
Transcript
SwiftTweaks @ikesyo ؔϞόΠϧΞϓϦݚڀձ #14, 2016-05-25 Wed #ؔϞό
@ikesyo • ͍͚͠ΐʔʗా ᠳ • ͯͳ@ژ • https://twitter.com/ikesyo • https://github.com/ikesyo
✨ Contributions ✨ • ReactiveCocoa • Carthage (Commandant, ReactiveTask) •
Result • Himotoki • APIKit
Tweaking
Why? • Parameters adjustment • Animation (location, duration, ...) •
Color • Layout • ... • Debug mode • Clear settings • Change API environment • Toggle experimental features • ... • And what you want
Facebook/Tweaks
Tweaks An easy way to fine-tune, and adjust parameters for
iOS apps in development.
Objective-C // Value CGFloat animationDuration = FBTweakValue(@"Category", @"Group", @"Duration", 0.5);
// Bind FBTweakBind(self.headerView, alpha, @"Main Screen", @"Header", @"Alpha", 0.85); FBTweakBind(webView.scrollView, scrollEnabled, @"Browser", @"Scrolling", @"Enabled", YES); // Action FBTweakAction(@"Player", @"Audio", @"Volume", ^{ NSLog(@"Action selected."); });
Swift // FBTweak~~ are macro, so those can't be used
in Swift let tweak = FBTweak(identifier: "com.tweaks.example.advanced") tweak.name = "Advanced settings" tweak.defaultValue = false let collection = FBTweakCollection(name: "Enable"); collection.addTweak(tweak) let category = FBTweakCategory(name: "Settings") category.addTweakCollection(collection) let store = FBTweakStore.sharedInstance() store.addTweakCategory(category) tweak.addObserver(self) func tweakDidChange(tweak: FBTweak!) { self.advancedSettingsEnabled = tweak.currentValue as Bool }
!!!
Khan/SwiftTweaks
SwiftTweaks Tweak your iOS app without recompiling! • Supported types
• Bool • Int • CGFloat • Double • UIColor • Group template • Floating window
Steps 1. Create a TweakLibraryType. 2. Reference that TweakLibraryType in
your code to use a Tweak. 3. Use the TweakWindow in your AppDelegate.
Make your TweakLibrary public struct ExampleTweaks: TweakLibraryType { public static
let colorTint = Tweak( "General", "Colors", "Tint", UIColor.blueColor()) public static let marginHorizontal = Tweak<CGFloat>( "General", "Layout", "H. Margins", defaultValue: 15, min: 0) public static let marginVertical = Tweak<CGFloat>( "General", "Layout", "V. Margins", defaultValue: 10, min: 0) public static let featureFlagMainScreenHelperText = Tweak( "Feature Flags", "Main Screen", "Show Body Text", true) public static let buttonAnimation = SpringAnimationTweakTemplate( "Animation", "Button Animation") ... }
Make your TweakLibrary public struct ExampleTweaks: TweakLibraryType { ... public
static let defaultStore: TweakStore = { let allTweaks: [TweakClusterType] = [colorTint, marginHorizontal, marginVertical, featureFlagMainScreenHelperText, buttonAnimation ] #if DEBUG let tweaksEnabled: Bool = true #else let tweaksEnabled: Bool = false #endif return TweakStore( tweaks: allTweaks, enabled: tweaksEnabled ) }() }
Using Your TweakLibrary // Assign button.tintColor = ExampleTweaks.assign(ExampleTweaks.colorTint) // Bind
ExampleTweaks.bind(ExampleTweaks.colorTint) { button.tintColor = $0 } // Bind multiple let tweaksToWatch: [TweakType] = [ ExampleTweaks.marginHorizontal, ExampleTweaks.marginVertical ] ExampleTweaks.bindMultiple(tweaksToWatch) { let horizontal = ExampleTweaks.assign(ExampleTweaks.marginHorizontal) let vertical = ExampleTweaks.assign(ExampleTweaks.marginVertical) scrollView.contentInset = UIEdgeInsets( top: vertical, right: horizontal, bottom: vertical, left: horizontal) }
Roadmaps Let's contribute! ✨ • "Backups" feature • Support String
as a TweakViewDataType • Add a "closure" Tweak Type • Design & Build tvOS UI • Design & Build iPad UI
☺☺☺
!" Happy Tweaking!! "!
Thank you❗"