Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

didn't present #3

Closed
AMJ-7 opened this issue Jun 2, 2021 · 5 comments
Closed

didn't present #3

AMJ-7 opened this issue Jun 2, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@AMJ-7
Copy link

AMJ-7 commented Jun 2, 2021

Describe the bug
didn't present the indicatorView
To Reproduce

import SPIndicator

class ViewController: UIViewController {

    let indicatorView = SPIndicatorView(title: "wow", message: "succ")

    override func viewDidLoad() {
        super.viewDidLoad()
        indicatorView.layout.iconSize = .init(width: 24, height: 24)
        indicatorView.layout.margins.top = 20
        indicatorView.dismissByDrag = true
        indicatorView.present()
    }

Smartphone (please complete the following information):

  • iOS Version = 14
  • SPIndicator` version = 1.1.5
  • Installed via [e.g. SPM, Cocoapods, Manually] = cocapods
@AMJ-7 AMJ-7 added the bug Something isn't working label Jun 2, 2021
@ivanvorobei
Copy link
Owner

Hi there!
You shouldn't present any controllers or views in viewDidLoad method, because controller not visible at this moment. Choose viewDidAppear for example.

@AMJ-7
Copy link
Author

AMJ-7 commented Jun 3, 2021

No, didn't worked ?!!

@ivanvorobei
Copy link
Owner

Provide please code

@ivanvorobei ivanvorobei reopened this Jun 3, 2021
@AMJ-7
Copy link
Author

AMJ-7 commented Jun 3, 2021

Provide please code


import UIKit
import SPIndicator

class ViewController: UIViewController {

    let indicatorView = SPIndicatorView(title: "Complete", preset: .done)

    override func viewDidLoad() {
        super.viewDidLoad()
        print("viewDidLoad")
    }

    override func viewDidAppear(_ animated: Bool) {
        indicatorView.present(duration: 1, haptic: .error) {
            print("viewDidAppear")
        }
    }
    
}

@ivanvorobei
Copy link
Owner

You are right. Please, update to latest version. Fixed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants