All Projects → T-Pham → ViewDidAppearFirstTime

T-Pham / ViewDidAppearFirstTime

Licence: MIT License
🙈 Adds viewWillAppearFirstTime(_:) and viewDidAppearFirstTime(_:) to UIViewController

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ViewDidAppearFirstTime

Swiftassetspickercontroller
A simple assets picker controller based on iOS 8 Photos framework. Supports iCloud photos and videos. It's written in Swift.
Stars: ✭ 81 (+478.57%)
Mutual labels:  uikit, uiviewcontroller
Jelly
🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.
Stars: ✭ 2,319 (+16464.29%)
Mutual labels:  uikit, uiviewcontroller
ALButtonMenu
A simple, fully customizable menu solution for iOS.
Stars: ✭ 45 (+221.43%)
Mutual labels:  uikit, uiviewcontroller
ChatViewController
💬 ChatViewController, ChatBar, ImagePicker like Slack Application. Message App written in Swift
Stars: ✭ 47 (+235.71%)
Mutual labels:  uikit
mnist-coreml
Simple convolutional neural network to predict handwritten digits using Keras + CoreML for WWDC '18 scholarship [Accepted]
Stars: ✭ 45 (+221.43%)
Mutual labels:  uikit
ColorUp
An easy way to generate strongly typed Swift extensions for either UIColor or Color based off of your colors within the project's asset catalog.
Stars: ✭ 16 (+14.29%)
Mutual labels:  uikit
Texture
Smooth asynchronous user interfaces for iOS apps.
Stars: ✭ 7,512 (+53557.14%)
Mutual labels:  uikit
Extras
Just some extras..
Stars: ✭ 17 (+21.43%)
Mutual labels:  uikit
qi-design-vue
This is a design standard with an implement for web UI components library based on Vue.
Stars: ✭ 26 (+85.71%)
Mutual labels:  uikit
column-text-view-ui
📄 Column Text View is an adaptive UI component that renders text in columns, horizontally [iOS 12, UIKit, TextKit, SwiftUI].
Stars: ✭ 11 (-21.43%)
Mutual labels:  uikit
iakit
无依赖 mini 组件库,只封装了 alert, toast, loading, actionSheet 等使用频率较高的组件。适用于类似 H5 活动页的简单移动端项目,不必为了使用这些组件而引入一个大而全的 UI 库和框架。
Stars: ✭ 38 (+171.43%)
Mutual labels:  uikit
SPPerspective
Widgets iOS 14 animation with 3D and dynamic shadow. Customisable transform and duration.
Stars: ✭ 271 (+1835.71%)
Mutual labels:  uikit
LSAdditions
The Category of Commonly used controls and you can create a control quickly(Object, Control ...)
Stars: ✭ 15 (+7.14%)
Mutual labels:  uikit
ukFontAwesome
Font Awesome icons for UIkit 3
Stars: ✭ 29 (+107.14%)
Mutual labels:  uikit
ng-sq-ui
Flexible and easily customizable UI-kit for Angular 11+
Stars: ✭ 99 (+607.14%)
Mutual labels:  uikit
Musical-View
An implementation of a semi-modal view like iOS Music app.
Stars: ✭ 46 (+228.57%)
Mutual labels:  uikit
ikyle.me-code-examples
Smaller code examples from my blog posts on ikyle.me
Stars: ✭ 29 (+107.14%)
Mutual labels:  uikit
TableViewKit
Empowering UITableView with painless multi-type cell support and built-in automatic state transition animations
Stars: ✭ 105 (+650%)
Mutual labels:  uikit
Generic-Network-Layer iOS
Generic Network Layer created using Swift.
Stars: ✭ 32 (+128.57%)
Mutual labels:  uikit
Selector-Closure
A light way to convert objc target-action style to closure
Stars: ✭ 14 (+0%)
Mutual labels:  uikit

ViewDidAppearFirstTime

The library lets you know whether your UIViewController subclasses' viewWillAppear and viewDidAppear are being called for the first time. It adds the following methods:

  • viewWillAppearFirstTime(_:): called when viewWillAppear the first time.
  • viewWillAppearAgain(_:): called when viewWillAppear the second time on.
  • viewDidAppearFirstTime(_:): called when viewDidAppear the first time.
  • viewDidAppearAgain(_:): called when viewDidAppear the second time on.

Before:

import UIKit

class ViewController: UIViewController {

    var firstTime = true

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        if firstTime {
            //viewWillAppear first time
        } else {
            //viewWillAppear again
        }
    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        if firstTime {
            //viewDidAppear first time
            firstTime = false
        } else {
            //viewDidAppear again
        }
    }
}

After:

import UIKit
import ViewDidAppearFirstTime

//in AppDelegate: UIViewController.activateFirstAppearance()

class ViewController: UIViewController, FirstAppearance {

    func viewWillAppearFirstTime(_ animated: Bool) {
        //viewWillAppear first time
    }

    func viewWillAppearAgain(_ animated: Bool) {
        //viewWillAppear again
    }

    func viewDidAppearFirstTime(_ animated: Bool) {
        //viewDidAppear first time
    }

    func viewDidAppearAgain(_ animated: Bool) {
        //viewDidAppear again
    }
}

Installation

pod 'ViewDidAppearFirstTime'

License

ViewDidAppearFirstTime is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].