类:AVC
#import <UIKit/UIKit.h>
typedef void(^ABlock)(void);
@interface AVC : UIViewController
@property (nonatomic,copy) ABlock aBlock;
@end
引用类:
@IBAction func btnClick(sender: AnyObject) {
let vc:AVC = AVC()
vc.aBlock = ({[weak self] in
let vc0:AVC = AVC()
self!.navigationController?.pushViewController(vc0, animated: true)
})
self.navigationController?.pushViewController(vc, animated: true)
}