Monday, 15 August 2011

cocoa - Custom insertion point for NSTextView -


I am changing the entry point size by override - (zero) drawInsertionPointInRect: (NSRect) aRect color :( NSColor *) aColor turnOn: (BOOL) flag , but it does not handle the first wink (when you move the insertion point, it goes back to normal)

I For the first time snoozing the method, take a nap. - (zero) _drawInsertionPointInRect: (NSRact) Color of one color: (NSCLOR *) acolor .

But this is not a solution from overriding for me. The personal methodology results from the App Store. I want to put the app in the app store. I see that apps like IAre and Writer have a custom entry point and they are in the App Store.

Do anyone know how they managed to do this rather than override the personal method, or better way?

Thank you.

  - (zero) _drawEnsertionPointInRect: (NSRact) Color color: (NSCLOR *) aColor {aRect.size.width = 3.0; [One color set]; [NSBZ; Paid Fill: ARC]; } - (Zero) Drawerspointpoint Protect: (NSRact) ARACT COLOR: (NSCLOR *) A collar is on: (BUL) flag {if (flag) {aRect.size.width = 3.0; [One color set]; [NSBZ; Paid Fill: ARC]; } And {{Self-Setances: Exhibit Protective: [Extra addition to avoiding Self-SafeSecurity]: No]; The problem is that the clipping path is effective when the drawInsertionPointInRect is called.  
  - (zero) drawInsertionPointInRect: (NSR) Rect Color: (NSCLOR *) Color has changed: (BOOL) flag {rect.size.width = 8.0; NSBZier Path * path = [NSBZAR path beatsed: context]; [Path setclip]; // Hardly set the clipping area (test only!) [Fill the path]; }   

Note that the above code will skip the artifacts (in my test, Diencetertujiencontact is not called to empty the merge point, to attract only). Use SetDrawsBackground: YES in a quick and dirty way to clean artifacts.

No comments:

Post a Comment