Category: iOS

  • Add placeholder for UITextView (phần 1)

    Add placeholder for UITextView (phần 1)

  • Swift—Design patterns: Multicast Delegate

    Swift—Design patterns: Multicast Delegate

    Ứng dụng của multicase delegate, lúc nào thì dùng? Dùng multicast delegate khi mà bạn muốn xây dựng một mô hình delegate có mối quan hệ 1 – nhiều.

  • Swift—KeyPaths (1)

    Swift—KeyPaths (1)

    KeyPaths là cách để truy cập đến property chứ không phải truy cập đến giá trị của property. Khi định nghĩa KeyPaths thì ta hoàn toàn có thể xác định/định nghĩa được kiểu biến của KeyPaths…

  • Swift—Codable

    Swift—Codable

  • iOS — Play RTSP Streaming

    iOS — Play RTSP Streaming

    Hướng dẫn sử dụng IJK Player để play RTSP streaming. IJK Player là lib được phát triển dựa trên thư viện ffmpeg

  • Khởi tạo (Initialization) trong Swift

    Khởi tạo (Initialization) trong Swift

    Việc khởi tạo trong bất cứ ngôn ngữ lập trình nào đều rất rất quan trọng, trong một project thì bạn sẽ liên tục phải thực hiện khởi tạo các instance của các struct, class hoặc enum. Việc hiểu rõ và sử dụng thành thạo quá trình khởi tạo trong swift sẽ giúp bạn tăng…

  • Fresher Training—iOS Basic Day 2

    Fresher Training—iOS Basic Day 2

    Today topic: App Life cycle View Controller Life cycle UIView Exerices: Exercise 01: App Life Cycle Hãy phân tích những delegate sẽ được gọi trong những trường hợp sau: Khi user quit app từ fast app switcher (multi task) Khi app bị crash do source code Khi app bị suspended Khi user mở app khác…

  • Fresher Training—iOS Swift Day 4

    Fresher Training—iOS Swift Day 4

    Today topic: Encoding & Decoding Types Asynchronous Closures & Memory Management Value Types & Value Semantics Protocol-Oriented Programming Tham khảo: https://nhathm.com/swift-closure-escaping-autoclosure-b6cc22729e7 Exercises: Exercise 01: ENCODING & DECODING Make this source code Codeable struct Student { var name: String var age: Int var study: [StudyClass] } struct StudyClass { var className: String var classCode: String }…

  • Fresher Training—iOS Swift Day 3

    Fresher Training—iOS Swift Day 3

    Today topic: Access Control & Code Organization Custom Operators, Subscripts & Keypaths Pattern Matching Error Handling Thao khảo: Swift—Advanced control flow Exercises: Exercise 01: SINGLETON A singleton is a design pattern that restricts the instantiation of a class to one object. Use access modifiers to create a singleton class Logger. This Logger should: Provide shared,…

  • Swift—Advanced control flow

    Swift—Advanced control flow

    Bài viết này giới thiếu cái khái niệm và các dùng về control flow trong Swift: For loop Countable ranges countable closed range: 0…5 countable half-open range: let halfOpenRange = 0..<5 For in với where condition Swift hỗ trợ for in where để lọc ra các điều kiện phù hợp trong tập cho trước: var…