ios - How to call CGRectDivide in Swift? -
i'm trying call cgrectdivide , can't figure out syntax in swift. language guide doesn't seem help.
here's template:
cgrectdivide(rect: cgrect, slice: cmutablepointer<cgrect>, remainder: cmutablepointer<cgrect>, amount: cgfloat, edge: cgrectedge)
my code:
var r = uiscreen.mainscreen().bounds var myslice: cgrect var myremainder: cgrect cgrectdivide(rect: cgrect, slice: myslice<cgrect>, remainder: myremainder<cgrect>, amount: 44.0, edge: cgrectedge.maxyedge)
that gives me error: "cannot specialize non-generic definition"
i'm stumped. swift being readable language.
try this:
cgrectdivide(r, &myslice, &myremainder, 44.0, cgrectedge.maxyedge)
Comments
Post a Comment