Skip to content

trouble dismissing & presentInView function doesn't seem to do anything with the view arg #22

@edwardIshaq

Description

@edwardIshaq

-(void)presentInView:(UIView *)view withGravityAnimation:(BOOL)animation {
function doesn't seem to do much with the view argument.

Also i'm having issue with the taps. not seeing the block get executed on tap

  @IBAction func showNotifAction(sender: AnyObject) {
        let dumView = UIView(frame: CGRect(origin: CGPointZero, size: CGSize(width: 100, height: 100)))
        dumView.backgroundColor = UIColor.redColor()

        testNotifications(dumView)
    }

    func testNotifications(inView: UIView) {

        let note = AFDropdownNotification()
        note.titleText = "Test run"
        note.subtitleText = "something needs your attention"
        note.image = UIImage.stockPhoto()
        note.topButtonText = "ToP"
        note.bottomButtonText = "bUttom"
        note.isImageRounded = true
        note.dismissOnTap = true

        note.listenEventsWithBlock { (event: AFDropdownNotificationEvent) in
            note.dismissWithGravityAnimation(true)
            switch event {
            default:
                log(event)

            }
        }

        log(inView)
        note.presentInView(inView, withGravityAnimation: false)

        dispatchMainDelayed(delay: 3) {
            //note.dismissWithGravityAnimation(true)
        }


    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions