You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+(void)tappedToast:(UIGestureRecognizer*)recognizer
{
// Only respond if we're in the ended state (similar to touchupinside)
if( [recognizer state] == UIGestureRecognizerStateEnded )
{
// the label that was tapped
//UILabel* label = (UILabel*)[recognizer view];
// DO SOMETHING HERE
}
}
Finally I added the following code to your methods __createWithText and __createWithImage to link the tappedToast method to the tap gesture.
I am new to iOS development and also to GitHub so apologies if I am doing all this wrong.
Thank you. I found this project very helpful.
iOS6 / Depreciation Warnings
Just wanted to point out a couple of minor changes that I needed for iOS 6 because of depreciation warnings:
Inside method __createWithText in file WToast.m
Tapping a toast performing an action
I also wanted to share a useful addition: performing an action when a toast is tapped
In file WToast.h I declared in the interface block:
And in file WToast.m I implemented:
Finally I added the following code to your methods __createWithText and __createWithImage to link the tappedToast method to the tap gesture.
Hope this is helpful to someone.
The text was updated successfully, but these errors were encountered: