Declare a class Android and Swift
Android Swift
// Create new class
public class myClass{

	public static myClass newInstance() {
		myClass frag = new myClass();
		return frag;
	}
	
}

// Create a new object of myClass
myClass tempMyClass = new myClass();

 

// Create new class
class myClass {
    
    init() {      
    }
    
}

// Create a new object of myClass
let c = myClass()

 

 

Comments