August 2025
Intermediate to advanced
270 pages
6h 16m
English
In the iOS app, create a new directory under App and name it Components. Inside, create a new Swift file named ButtonComponent.swift. Replace the contents with the following:
| | import HotwireNative |
| | import UIKit |
| | |
| | class ButtonComponent: BridgeComponent { |
| | } |
Next, identify this component as “button”, just like on the web.
| | import HotwireNative |
| | import UIKit |
| | |
| | class ButtonComponent: BridgeComponent { |
| » | override class var name: String { "button" } |
| | } |
Unlike the web, we have to manually register this component with Hotwire Native. Open AppDelegate.swift and register this bridge component ...
Read now
Unlock full access