#import "TTDialog.h"
...
{
[TTDialog showDialog];
}
- Add the QuartzCore framework to your project.
- crear un .xib
--
una vez creado se puede setear ese xib por default llamando a
[TTDialog setDefaultNibName:@"<#nib_name#>"];
para que todas las veces que se llame a showDialog nos abra por default ese xib
o si es por un caso unico y especial se puede llamar a showDialog mandandole por parametro el NibName de la View
[TTDialog showDialogWithNibName:@"<#nib_name#>"];
para mejor uso se pueden usar metodos como estos para enviarle por parametro una vista especifica donde se abra el TTDialog
o el delegate para futuros callouts.
+ (void) showDialogInView:(UIView*)parentVew;
+ (void) showDialogInView:(UIView*)parentVew withDelegate:(id)delegate_ ;
+ (void) showDialogWithDelegate:(id)delegate_;
+ (void) showDialogWithNibName:(NSString *)nibName;
+ (void) showDialogWithNibName:(NSString *)nibName andDelegate:(id)delegate_;
+ (void) showDialogWithNibName:(NSString *)nibName inView:(UIView*)parentVew;
+ (void) showDialogWithNibName:(NSString *)nibName inView:(UIView*)parentVew andDelegate:(id)delegate_;
TTDialog
can be customized via the following methods:
+ (void) setDefaultNibName:(NSString *)nibName; // default is @"TTDialog"
+ (void) setShouldBounce:(BOOL)bounce; // default is YES
+ (void) setShouldRotate:(BOOL)rotate; // default is NO
+ (void) setSmallerToBigger:(BOOL)smallerToBigger_; // default is YES
+ (void) setAnimationDuration:(double)duration; // defualt is 0.5
you can customize the callback in the inherited view controller
- (void) callbackDialog;
or you can set and use in the inherited view controller
@protected SEL callback;
@protected id delegate;