Daltron / NotificationBanner

The easiest way to display highly customizable in app notification banners in iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Floating banner is not working

afern247 opened this issue · comments

Hi! I just discovered this beautiful package and tried this:

let banner = FloatingNotificationBanner(title: "...", subtitle: "....", style: .info)
banner.haptic = .medium

banner.show()

but the banner style shows like the default, not in a floating view, am I doing something wrong?

I'm using XCode 13, swift 5.5, swiftui 3.0

Thanks

+1

It works if you'll add such cornerRadius
banner.show(cornerRadius: 16)

banner.show(cornerRadius: 16)

That doesn't work for me, look at this function:

func showGrowingNotificationBannerInfo(title: String, subtitle: String, style: BannerStyle, hapticFeedback: BannerHaptic, autoDismiss: Bool) {
    let showingPremiumBanner = GrowingNotificationBanner(title: title, subtitle: subtitle, style: .info)
    showingPremiumBanner.haptic = hapticFeedback
    showingPremiumBanner.autoDismiss = autoDismiss
    showingPremiumBanner.dismissOnSwipeUp = true
    showingPremiumBanner.show()
}

If I write showingPremiumBanner.show(cornerRadius: 16) it says: Extra argument 'cornerRadius' in call

can you post a working example

banner.show(cornerRadius: 16) works for me in XCode 12.5, Swift 5 and framework version 3.0.6
Maybe it's a SwiftUI issue

banner.show(cornerRadius: 16)

That doesn't work for me, look at this function:

func showGrowingNotificationBannerInfo(title: String, subtitle: String, style: BannerStyle, hapticFeedback: BannerHaptic, autoDismiss: Bool) {
    let showingPremiumBanner = GrowingNotificationBanner(title: title, subtitle: subtitle, style: .info)
    showingPremiumBanner.haptic = hapticFeedback
    showingPremiumBanner.autoDismiss = autoDismiss
    showingPremiumBanner.dismissOnSwipeUp = true
    showingPremiumBanner.show()
}

If I write showingPremiumBanner.show(cornerRadius: 16) it says: Extra argument 'cornerRadius' in call

can you post a working example

it works for FloatingNotificationBanner, not GrowingNotificationBanner

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

commented

This issue has been automatically closed due to inactivity.