Ios Ui Navigation
ASecurityHere’s a quick-start UIKit navigation example that follows the iOS UI navigation skill: ```swift import UIKit final class HomeViewController: UIViewController { private let detailsButton: UIButton = { let button = UIButton(type: .system) button.translatesAutoresizingMaskIntoConstraints = false button.setTitle("Open Details", for: .normal) button.titleLabel?.font = .preferredFont(forTextStyle: .headline) button.accessibilityLabel = "Open details screen" return button }() override func viewDidL...
- 584 stars
- 0 votes
- 0 copies
- 3 views
- Added September 5, 2026
Security analysis
100/100Pro scans all 12 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill ios-ui-navigation --agent claude-codeAre you the author of Ios Ui Navigation?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-ios-ui-navigation-894a5ae0)Here’s a quick-start UIKit navigation example that follows the iOS UI navigation skill:
```swift
import UIKit
final class HomeViewController: UIViewController {
private let detailsButton: UIButton = {
let button = UIButton(type: .system)
button.translatesAutoresizingMaskIntoConstraints = false
button.setTitle("Open Details", for: .normal)
button.titleLabel?.font = .preferredFont(forTextStyle: .headline)
button.accessibilityLabel = "Open details screen"
return button
}()
override func viewDidLoad() {
super.viewDidLoad()
title = "Home"
view.backgroundColor = .systemBackground
navigationItem.largeTitleDisplayMode = .always
view.addSubview(detailsButton)
NSLayoutConstraint.activate([
detailsButton.centerXAnchor.constraint(equalTo: view.centerXAnchor),
detailsButton.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor)
])
detailsButton.addTarget(self, action: #selector(openDetails), for: .touchUpInside)
}
@objc private func openDetails() {
let feedback = UINotificationFeedbackGenerator()
feedback.notificationOccurred(.success)
navigationController?.pushViewController(DetailsViewController(), animated: true)
}
}
final class DetailsViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
title = "Details"
view.backgroundColor = .secondarySystemBackground
}
}
@main
final class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
let window = UIWindow(frame: UIScreen.main.bounds)
let rootViewController = UINavigationController(rootViewController: HomeViewController())
rootViewController.navigationBar.prefersLargeTitles = true
window.rootViewController = rootViewController
window.makeKeyAndVisible()
self.window = window
return true
}
}
```
Why this is a solid starting point:
- Uses `UINavigationController` for standard push navigation.
- Uses Auto Layout instead of manual frames.
- Anchors layout to the safe area.
- Supports Dynamic Type with `preferredFont`.
- Adds an `accessibilityLabel`.
- Uses haptic feedback on navigation action.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
- trigger-5.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.