|
Redrawing a view during a dragging session
Hi all, I’m updating some legacy code that currently uses the ‘classic’ way to drag stuff, namely [NSView dragImage:at:offset:event:pasteboard:source:slideBack:]; This code has been deprecated forever
Hi all, I’m updating some legacy code that currently uses the ‘classic’ way to drag stuff, namely [NSView dragImage:at:offset:event:pasteboard:source:slideBack:]; This code has been deprecated forever
|
By
Graham Cox
·
|
|
Redrawing a view during a dragging session [SOLVED]
As usual, the answer was staring me in the face. The old code was synchronous, the new is asynchronous. I was restoring the view after the call to -dragImage… because that used to keep control until t
As usual, the answer was staring me in the face. The old code was synchronous, the new is asynchronous. I was restoring the view after the call to -dragImage… because that used to keep control until t
|
By
Graham Cox
·
|
|
UndoManager setActionNames
The action name is part of the “view” layer in model-controller-view architecture. But most of the actual undoable ’stuff’ is in the model. So I usually set the action name at the top level action met
The action name is part of the “view” layer in model-controller-view architecture. But most of the actual undoable ’stuff’ is in the model. So I usually set the action name at the top level action met
|
By
Graham Cox
·
|
|
Abstracting a group of commonly named Selectors
17 messages
I have a certain group of selectors that all follow a strict naming convention, -(Status)parseXYZ -(Status)parseRST All have one line that does the same thing and return a scalar (enum) as a result. E
I have a certain group of selectors that all follow a strict naming convention, -(Status)parseXYZ -(Status)parseRST All have one line that does the same thing and return a scalar (enum) as a result. E
|
By
Sandor Szatmari
·
|
|
Determine System Time Format (12hr vs 24hr)
I have been using the following code to determine if a system is set to 12hr or 24hr time for sometime… NSString *formatStringForHours = [NSDateFormatter dateFormatFromTemplate:@"j" options:0 locale:[
I have been using the following code to determine if a system is set to 12hr or 24hr time for sometime… NSString *formatStringForHours = [NSDateFormatter dateFormatFromTemplate:@"j" options:0 locale:[
|
By
Sandor Szatmari
·
|
|
Data structures and user interaction conundrum
5 messages
Hi all, I Have an interesting little problem, thought I’d throw it out there and see if it stirs up any discussion…. Graphics app, wherein the user can draw stuff - arbitrary vectors on a canvas. My b
Hi all, I Have an interesting little problem, thought I’d throw it out there and see if it stirs up any discussion…. Graphics app, wherein the user can draw stuff - arbitrary vectors on a canvas. My b
|
By
Graham Cox
·
|
|
CATiledLayer in NSView (Mac) -- how?
2 messages
Does anyone have sample code or just a few hints how to use CATiledLayer in a NSView on Mac? I’m reasonably au fait with using layers in a view in general, but this one is very minimally documented an
Does anyone have sample code or just a few hints how to use CATiledLayer in a NSView on Mac? I’m reasonably au fait with using layers in a view in general, but this one is very minimally documented an
|
By
Graham Cox
·
|
|
UISplitViewController and iOS14
I have a storyboard-based app based on a split-view. I have edited the split view as shown in the attached screenshot. My goal is to have a single storyboard that will handle both iPhone and iPad targ
I have a storyboard-based app based on a split-view. I have edited the split view as shown in the attached screenshot. My goal is to have a single storyboard that will handle both iPhone and iPad targ
|
By
Rick Aurbach
·
|
|
Automated connecting to a WiFi network.
I’m wondering if anyone thinks it’s remotely possible to automatically connect an iOS device to a WiFi network with user permission. Sort of select a network, wait for a network access over that inter
I’m wondering if anyone thinks it’s remotely possible to automatically connect an iOS device to a WiFi network with user permission. Sort of select a network, wait for a network access over that inter
|
By
Alex Zavatone
·
|
|
Protocols and Default Implementations
Suppose I have a protocol that contains a method with a default implementation: public protocol A { func foo() } public extension A { func foo() { print("A.foo()") } } Now in a class that conforms to
Suppose I have a protocol that contains a method with a default implementation: public protocol A { func foo() } public extension A { func foo() { print("A.foo()") } } Now in a class that conforms to
|
By
Rick Aurbach
·
|
|
Design Pattern Help Needed
2 messages
I have what must be a common problem, and am looking for some architectural suggestions. Over the years, I've built custom objects (e.g., popup calendars, button menus, etc) which have now been added
I have what must be a common problem, and am looking for some architectural suggestions. Over the years, I've built custom objects (e.g., popup calendars, button menus, etc) which have now been added
|
By
Rick Aurbach
·
|
|
Anyone using CloudKit?
7 messages
Hey, is anyone here using CloudKit? I'm getting started with it and have issues. There's some content on Apple's dev forums, but frankly even the new improved forums have awful UX (why couldn't they h
Hey, is anyone here using CloudKit? I'm getting started with it and have issues. There's some content on Apple's dev forums, but frankly even the new improved forums have awful UX (why couldn't they h
|
By
Jens Alfke
·
|
|
custom table row selection highlights - my bug or Apple's?
3 messages
I have a view-based NSTableView in a scroll view. I want to customized the way that selection highlighting is drawn. So, I set up a controller as a delegate of the table, and in the delegate method ta
I have a view-based NSTableView in a scroll view. I want to customized the way that selection highlighting is drawn. So, I set up a controller as a delegate of the table, and in the delegate method ta
|
By
James Walker
·
|
|
bonjour broken in iOS 14
5 messages
This worked up to iOS 13: let serviceType = "_Gmd-BackGround._tcp." let parameters = NWParameters() parameters.includePeerToPeer = true let browser = NWBrowser(for: .bonjour(type: serviceType, domain:
This worked up to iOS 13: let serviceType = "_Gmd-BackGround._tcp." let parameters = NWParameters() parameters.includePeerToPeer = true let browser = NWBrowser(for: .bonjour(type: serviceType, domain:
|
By
Gerriet M. Denkmann
·
|
|
NSMetadataQuery results property
The shows this property: @property (readonly, copy) NSArray *results; // this is for K-V Bindings, and causes side-effects on the query Anybody know what the cryptic comment means about side-effects?
The shows this property: @property (readonly, copy) NSArray *results; // this is for K-V Bindings, and causes side-effects on the query Anybody know what the cryptic comment means about side-effects?
|
By
Steve Mills
·
|
|
iCloud question: CloudKit vs. NSFileManager
3 messages
A question for those experienced in iCloud: I want to implement some very basic iCloud tasks in my apps. Just to sync a few XML files that contain settings presets. So that the users can access their
A question for those experienced in iCloud: I want to implement some very basic iCloud tasks in my apps. Just to sync a few XML files that contain settings presets. So that the users can access their
|
By
Leo
·
|
|
Document versions browser shows windows in wrong stacking order/position
2 messages
I'm trying to figure out why the versions browser is doing this weird thing with my windows. A video is linked below. The top-left corner of each window contains a timestamp for when the window gets c
I'm trying to figure out why the versions browser is doing this weird thing with my windows. A video is linked below. The top-left corner of each window contains a timestamp for when the window gets c
|
By
Steve Mills
·
|
|
Many new warnings after Xcode upgrade
5 messages
I just updated to XCode 12.1, and my project is throwing a lot of new warnings about “double-quoted include in framework header”. This appears to be because of the build setting “Quoted include in Fra
I just updated to XCode 12.1, and my project is throwing a lot of new warnings about “double-quoted include in framework header”. This appears to be because of the build setting “Quoted include in Fra
|
By
Graham Cox
·
|
|
Ensure Framework Links to static lib not dylib
8 messages
I have a Framework and am adding support to it from code located in an external library. I have added the ‘.a’ version of the lib to the project (build phase link to…) I dragged it to the project navi
I have a Framework and am adding support to it from code located in an external library. I have added the ‘.a’ version of the lib to the project (build phase link to…) I dragged it to the project navi
|
By
Sandor Szatmari
·
|
|
Core Graphics: creating an image mask from a PDF?
2 messages
Hi all, I am using Core Graphics. I have an image as a PDF resource that I want to use as a mask - specifically, the PDF only contains black and white graphics as vectors. I have code that can turn th
Hi all, I am using Core Graphics. I have an image as a PDF resource that I want to use as a mask - specifically, the PDF only contains black and white graphics as vectors. I have code that can turn th
|
By
Graham Cox
·
|