souzainf3 / RNNotificationView

Emulates the native Notification Banner UI for any alert
MIT License
68 stars 22 forks source link

Crash while adding subtitleFont #1

Closed paresh-navadiya closed 7 years ago

paresh-navadiya commented 7 years ago
let notification = RNNotificationView()
notification.titleFont = UIFont(name: "AvenirNext-Bold", size: 12)!
notification.titleTextColor = UIColor.white
//Crashes on below line
notification.subtitleFont = UIFont(name: "AvenirNext", size: 14)!
//notification.isAnimating = true
notification.show(withImage: nil,
title: "Application Name",
message: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
                      onTap: {
                        print("Did tap notification")
    })
souzainf3 commented 7 years ago

The AvenirNext has installed? The unwrapper 'UIFont(name: "AvenirNext", size: 14)!' cause crash if value of nil.

You can verify this and return contact? Thanks.

souzainf3 commented 7 years ago

Finished for lack information(feedback).

Update The font "AvenirNext" not exist on system.