Quay lại Roadmap/Swift Ui Roadmap/
Đang tải...
Hướng dẫn thử thách
1 / 156

Access Control

### Giai đoạn: Nền Tảng & Khái Niệm Cốt Lõi **Access Control** Access control lets you restrict which parts of your code can be used and accessed by other parts of your code, or from code in other files and modules. It's like setting permissions on different components of your app, ensuring that sensitive data and internal workings are protected from unintended use or modification. You can specify different access levels, such as `private`, `fileprivate`, `internal`, `public`, and `open`, to control the visibility and accessibility of entities like classes, structures, properties, and functions. ### Khái niệm cốt lõi: 1. **Nắm vững khái niệm cơ bản** 2. **Áp dụng vào kiến trúc thực tế** 3. **Tối ưu hóa và kiểm thử** ### Tài liệu tham khảo chính thống: - [Access Control](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/accesscontrol) (official) - [Swift Access Control](https://www.programiz.com/swift-programming/access-control) (article) - [Swift Access Control: A Developer’s Guide to open, public, internal, fileprivate and private](https://mehrdad-ahmadian.medium.com/swift-access-control-a-developers-guide-to-open-public-internal-fileprivate-and-private-79d2dd595287) (article)
Nhiệm vụ của bạn
Viết giải pháp của bạn cho bài học **Access Control** vào trình soạn thảo bên cạnh. Bấm **Chạy Thử Nghiệm** (hoặc nhấn `Ctrl+Enter`) để thực thi và ghi nhận hoàn thành kỹ năng trên Roadmap. ### Kỹ năng cần đạt: - `Access` - `Control` - `Engineering`
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.swift
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵
Test Output
Thử thách này không có bài test tự động. Hãy quan sát kết quả trực tiếp ở khung Preview.