SwiftKickMobile / SwiftMessages

A very flexible message bar for UIKit and SwiftUI.
MIT License
7.31k stars 743 forks source link

Not able to use any other than tab view #316

Closed Kanishka3 closed 5 years ago

Kanishka3 commented 5 years ago

I am trying to present a message view of type CardView and MessageView but I am not able to do so and every time I try to do it, I get tabView only.

Here's the code Check it out:



        var config = SwiftMessages.Config()
        config.interactiveHide = false

        let cont = MessageView.viewFromNib(layout: MessageView.Layout.messageView)
        cont.backgroundColor = .white
        cont.bodyLabel?.textColor = .black
        cont.titleLabel?.textColor = .black

        cont.configureContent(title: "Your bio should be You may use a bio like: ", body: "I love music and music gaga. On this earth to make a change. Don't be shy to DM me." , iconImage: nil, iconText: ["πŸšΆπŸ»β€β™€οΈ","πŸšΆπŸ»β€β™‚οΈ","🀠"].sm_random(), buttonImage: nil, buttonTitle: "OK, I will do well") { (button) in
            SwiftMessages.hide()
        }

        SwiftMessages.show(config: config, view: cont)
Kanishka3 commented 5 years ago

Is it because that I am trying to customise the Swift Message

wtmoose commented 5 years ago

No. The above code will never display tab view, so my theory is that you're not running the code you think you are. If you can attach a sample project, I'll take a look.