Skip to content

Instantly share code, notes, and snippets.

@kirillp
Last active January 12, 2017 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirillp/9ba053223cbf0af54c2f268a954a88f9 to your computer and use it in GitHub Desktop.
Save kirillp/9ba053223cbf0af54c2f268a954a88f9 to your computer and use it in GitHub Desktop.
package delightex.moe.testutil;
import apple.uikit.UITableViewCell;
import apple.uikit.enums.UITableViewCellStyle;
import org.moe.natj.general.NatJ;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.NInt;
import org.moe.natj.general.ann.Runtime;
import org.moe.natj.objc.ObjCRuntime;
import org.moe.natj.objc.ann.ObjCClassName;
import org.moe.natj.objc.ann.Selector;
@Runtime(ObjCRuntime.class)
@ObjCClassName("MyTableViewCell")
public class MyTableViewCell extends UITableViewCell {
static {
NatJ.register();
}
protected MyTableViewCell(Pointer peer) {
super(peer);
System.out.println("MyTableViewCell.ctor");
}
@Selector("alloc")
@Generated
public static native MyTableViewCell alloc();
@Selector("init")
@Generated
public native MyTableViewCell init();
@Selector("initWithStyle:reuseIdentifier:")
@Override
@Generated
public UITableViewCell initWithStyleReuseIdentifier(@NInt long style, String reuseIdentifier) {
System.out.println("MyTableViewCell.initWithStyleReuseIdentifier");
return super.initWithStyleReuseIdentifier(UITableViewCellStyle.Subtitle, reuseIdentifier);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment