|
Game Kit Turn Based Match?
Hi,
I’m trying to understand how to use the GKTurnBasedMatch facility in Game Kit.
From reading the documentation, I’m not quite sure how make it work with the rules of the game I am developing.
Hi,
I’m trying to understand how to use the GKTurnBasedMatch facility in Game Kit.
From reading the documentation, I’m not quite sure how make it work with the rules of the game I am developing.
|
By
Dave
·
#141
·
|
|
Re: dispatch_async question
I should have probably said - “it actually doesn’t matter if its run on the Main thread or not, since the delegate its calling is thread safe”.
The class that the delegate calls to update the UI
I should have probably said - “it actually doesn’t matter if its run on the Main thread or not, since the delegate its calling is thread safe”.
The class that the delegate calls to update the UI
|
By
Dave
·
#142
·
|
|
NSWindowController and window release
Here we go again… another memory management issue.
I have a fairly simple situation where I instantiate a window controller (NSWindowController subclass), which loads its window from a nib file.
Here we go again… another memory management issue.
I have a fairly simple situation where I instantiate a window controller (NSWindowController subclass), which loads its window from a nib file.
|
By
Graham Cox
·
#143
·
|
|
Re: NSWindowController and window release
OK, I figured it out.
What was important to me was that the custom view was deallocated. Therefore it was the view’s -dealloc I was logging, not the window’s. I inferred, incorrectly, that it was
OK, I figured it out.
What was important to me was that the custom view was deallocated. Therefore it was the view’s -dealloc I was logging, not the window’s. I inferred, incorrectly, that it was
|
By
Graham Cox
·
#144
·
|
|
Re: Memory management of document modal panels
According to Mike Ash
(https://www.mikeash.com/pyblog/friday-qa-2009-08-14-practical-blocks.html
- see Caveats) self should be being retained.
Apple
According to Mike Ash
(https://www.mikeash.com/pyblog/friday-qa-2009-08-14-practical-blocks.html
- see Caveats) self should be being retained.
Apple
|
By
Jeff Laing
·
#145
·
|
|
SceeneKit not picking up arrow keys correctly?
Hi all,
I'm following a tutorial on SceneKit, which sets up a few nodes, a camera, and some keyboard capturing to let the user arrow around the sceene. The author of the code says it works on his
Hi all,
I'm following a tutorial on SceneKit, which sets up a few nodes, a camera, and some keyboard capturing to let the user arrow around the sceene. The author of the code says it works on his
|
By
Alex Hall
·
#146
·
|
|
nib loading error on foreign systems
I have a view controller that loads from a nib. I only have the nib in English, no other localizations. When I run with my normal American English setup, all is well. But if I set the
I have a view controller that loads from a nib. I only have the nib in English, no other localizations. When I run with my normal American English setup, all is well. But if I set the
|
By
James Walker
·
#147
·
|
|
Re: nib loading error on foreign systems
Sorry, I misunderstood the situation. The Xcode debugger was lying to me about some member variables being NULL. The real problem was an assertion failure in -[NSCell
Sorry, I misunderstood the situation. The Xcode debugger was lying to me about some member variables being NULL. The real problem was an assertion failure in -[NSCell
|
By
James Walker
·
#148
·
|
|
How to print class name in Swift
This works (prints either null, NSString or NSNumber)
- (id)transformedValue:(id)value
{
NSLog(@"%s value %@ %@",__FUNCTION__, [value class], value);
…
}
But my Swift version:
override func
This works (prints either null, NSString or NSNumber)
- (id)transformedValue:(id)value
{
NSLog(@"%s value %@ %@",__FUNCTION__, [value class], value);
…
}
But my Swift version:
override func
|
By
Gerriet M. Denkmann
·
#149
·
|
|
Re: How to print class name in Swift
My understanding is that an optional is just a type that wraps another type. So you need to unwrap the optional before calling String(describing: type(of: value))) to get the class name that you are
My understanding is that an optional is just a type that wraps another type. So you need to unwrap the optional before calling String(describing: type(of: value))) to get the class name that you are
|
By
Dave Fernandes
·
#150
·
|
|
respondsToSelector in Swift
How to translate this into Swift
- (id)transformedValue:(id)value
{
if ( ![value respondsToSelector: @selector(doubleValue) ] )
{
NSLog(@"%s Error value %@ %@",__FUNCTION__, [value class],
How to translate this into Swift
- (id)transformedValue:(id)value
{
if ( ![value respondsToSelector: @selector(doubleValue) ] )
{
NSLog(@"%s Error value %@ %@",__FUNCTION__, [value class],
|
By
Gerriet M. Denkmann
·
#151
·
|
|
Re: respondsToSelector in Swift
It’s not clear which part of that is giving you trouble, but I was able to do this in a playground (Swift 4, Xcode 9), and got the expected output:
Note that Swift’s “AnyObject” has the same
It’s not clear which part of that is giving you trouble, but I was able to do this in a playground (Swift 4, Xcode 9), and got the expected output:
Note that Swift’s “AnyObject” has the same
|
By
Quincey Morris
·
#152
·
|
|
Re: respondsToSelector in Swift
Mostly the #selector.
And also, I did not know about AnyObject.
This now seems to work:
final class SpeedValueTransformer: ValueTransformer
{
override class func transformedValueClass() -> AnyClass
Mostly the #selector.
And also, I did not know about AnyObject.
This now seems to work:
final class SpeedValueTransformer: ValueTransformer
{
override class func transformedValueClass() -> AnyClass
|
By
Gerriet M. Denkmann
·
#153
·
|
|
Changing Folder Name in Xcode
I have a project:
Some Folder
Some.xcodeproj
Old and Bad Name
lots of stuff
I would like to change the folder “Old and Bad Name” to “Nice new name”
I could rename this folder in Finder
I have a project:
Some Folder
Some.xcodeproj
Old and Bad Name
lots of stuff
I would like to change the folder “Old and Bad Name” to “Nice new name”
I could rename this folder in Finder
|
By
Gerriet M. Denkmann
·
#154
·
|
|
Re: Changing Folder Name in Xcode
I wouldn’t edit the .pbxproj file. Under the assumption that your project has the files organized under yellow group “folder” icons (in the navigator pane, as opposed to blue “folder
I wouldn’t edit the .pbxproj file. Under the assumption that your project has the files organized under yellow group “folder” icons (in the navigator pane, as opposed to blue “folder
|
By
Quincey Morris
·
#155
·
|
|
Re: Changing Folder Name in Xcode
If you're using Git, this can be mitigated by simply using `git mv` to rename the directory (`git mv oldname newname`).
b
If you're using Git, this can be mitigated by simply using `git mv` to rename the directory (`git mv oldname newname`).
b
|
By
Ben Kennedy
·
#156
·
|
|
Re: Changing Folder Name in Xcode
On the right side of the project in one of the inspectors, there is a means of specifying the path to the item selected and how it is defined. Relative to Group, Relative to Project, Absolute Path,
On the right side of the project in one of the inspectors, there is a means of specifying the path to the item selected and how it is defined. Relative to Group, Relative to Project, Absolute Path,
|
By
Alex Zavatone
·
#157
·
|
|
Re: Changing Folder Name in Xcode
On Tue, 8 Aug 2017 17:50:13 +0700, Gerriet M. Denkmann said:
I've done that, and it's worked fine for me.
If the files are referenced relative it their parent, then I think it's just a matter of
On Tue, 8 Aug 2017 17:50:13 +0700, Gerriet M. Denkmann said:
I've done that, and it's worked fine for me.
If the files are referenced relative it their parent, then I think it's just a matter of
|
By
Sean McBride
·
#158
·
|
|
Re: Changing Folder Name in Xcode
Thanks to all who responded!
In my Xcode project, the yellow group “folder” icons in the navigator pane closely resemble the folder structure of my project. And I do not use git or
Thanks to all who responded!
In my Xcode project, the yellow group “folder” icons in the navigator pane closely resemble the folder structure of my project. And I do not use git or
|
By
Gerriet M. Denkmann
·
#159
·
|
|
How to get full user name prior to 10.12?
10.12 added a method to NSProcessInfo, -fullUserName.
How do I get the same info on earlier OS?
—Graham
10.12 added a method to NSProcessInfo, -fullUserName.
How do I get the same info on earlier OS?
—Graham
|
By
Graham Cox
·
#160
·
|