How to change NSRect to CGRect?

后端 未结 3 997
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-19 03:23
-(void)drawRect : (NSRect)rect 
{    
        imgRect.orgin = NSZeroPoint;

        imgRect.size = [appleImage size];

        drawRect = [self bounds];

        [ap         


        
3条回答
  •  情书的邮戳
    2021-01-19 03:58

    Just use these 2 Cocoa (no iOS) functions:

    CGRect NSRectToCGRect(NSRect nsrect);
    NSRect NSRectFromCGRect(CGRect cgrect);
    

    Have a look here to deepen the topic: http://cocoadev.com/CGRect

提交回复
热议问题