code-style-guide
iOS 编码规范
本规范适用于 Swift 和 Objective-C 项目,确保代码风格一致性和可维护性。
格式规范
缩进
Swift: 使用 4 个空格,不使用 Tab
// ✅ 正确
struct User {
let name: String
let age: Int
func greet() {
More from creeveliu/ios-skills
objective-c-language
Objective-C language best practices. Use this skill whenever the user mentions Objective-C, ObjC, OC, working with legacy iOS code, ARC, Blocks, Categories, Protocols, Runtime, or Swift interoperability.
14swiftui-best-practices
How to build iOS interfaces using SwiftUI following best practices. Use this skill whenever the user mentions SwiftUI, building Swift UI, creating views with Swift, state management, @State/@Binding/@ObservedObject, ViewBuilder, or needs guidance on SwiftUI architecture, performance optimization, or UIKit interoperability.
13uikit-best-practices
UIKit development best practices. Use this skill whenever the user mentions UIKit, UIViewController, Auto Layout, UITableView, UICollectionView, or needs guidance on iOS UI implementation using UIKit with Swift.
5user-experience
iOS user experience best practices. Use this skill whenever the user mentions UX, user experience, animations, haptic feedback, accessibility, localization, dark mode, or app polish.
4swift-language
Swift language best practices. Use this skill whenever the user mentions Swift programming, Swift syntax, memory management, async/await, generics, protocols, or needs guidance on writing idiomatic Swift code.
4app-stability
iOS app stability and crash prevention best practices. Use this skill whenever the user mentions crashes, stability, exception handling, thread safety, error handling, defensive programming, or app reliability.
4