Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

readme.md

Trick to performSelector in swift

Background

performSelector is hidden from swift,can't compile if use performSelector in swift. But performSelector is valid in objective-c. With objc bridge,we can use performSelector now.

quick usage

XPerformSelector.perform(self, selector: "test")

don't know how to use objc in swift? read this first

Swift and Objective-C in the Same Project

apis

+(void) perform: (id)target selector:(SEL)selector;
+(void) perform: (id)target selector:(SEL)selector count:(int)count, ...; 

+(void) perform: (id)target selector:(SEL)selector withObject:(id)arg1;
+(void) perform: (id)target selector:(SEL)selector withObject:(id)arg1 withObject:(id)arg2;

+(void) perform: (id)target selector:(SEL)selector afterDelay:(NSTimeInterval)delay;
+(void) perform: (id)target selector:(SEL)selector withObject:(id)arg1 afterDelay:(NSTimeInterval)delay;

About

use performSelector in swift

Resources

Packages

No packages published
You can’t perform that action at this time.