Skip to main content

Posts

Showing posts from November, 2019

Custom Transition Animations for iOS

https://medium.com/better-programming/custom-transition-animation-ios-f1bb57686293 Tất cả chúng ta đều muốn có animation transitions tới view controller của chúng ta. Thật không may animation transitions mặc định trông thật buồn chán. Mẹ tôi bảo rằng có cách nào để làm nó theo ý muốn của minh không? Và bây giờ tôi có thể bảo bạn tôi có thể làm cho nó tốt hơn. UIViewControllerTransitioningDelegate  Trong iOS, bạn có thể viết custom transitions giữa view controllers bằng cách implementing một custom UIViewControllerTransitioningDelegate. Đầu tiên, chúng ta sẽ tạo một đối tượng mới cái sẽ implementing UIViewControllerTransitioningDelegate protocol. class TransitioninDelegate : NSObject, UIViewControllerTransitioningDelegate { //1 func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { return ?? } //2 func animationController(forDismissed d

LaunchMode trong Android

LauchMode trong Android Activity: standard, singleTop, singleTask, singleInstance Android launch mode standard singleTop singleTask singleInstance Nguồn: https://inthecheesefactory.com/blog/understand-android-activity-launchmode/en Tác giả: nuuneoi (Android GDE, CTO & CEO at The Cheese Factory) Người dịch: Phạm Văn Khắc Trước khi đi sâu vào từng loại launch mode của activity, chúng ta cần hiểu một thuật ngữ quan trọng: 'Task'. Một task là ngăn xếp (stack - "Last in, First out"), nó chứa các activity bên trong. Android có thể giữ nhiều task tại cùng một thời điểm và chỉ một task là ở trên cùng (người dùng có thể nhìn thấy được). Tương tự với việc khi nhấn 2 lần vào nút Home trên iOS, nếu chúng ta nhấn giữ nút HOME trên Android (hoặc nút RECENT APPS) bạn sẽ thấy danh sách các ứng dụng đang chạy. Bạn có thể chọn một ứng dụng bên dưới để mang