> On Oct 1, 2017, at 2:32 PM, Glenn L. Austin wrote:
>
>>
>> On Oct 1, 2017, at 8:56 AM, Dave Reed via swift-users
>> wrote:
>>
>>
>>> On Sep 21, 2017, at 3:58 PM, V T via swift-users
>>> wrote:
>>>
>>> Hi there!
&
> On Sep 21, 2017, at 3:58 PM, V T via swift-users
> wrote:
>
> Hi there!
>
> Is there a best way to check if a given type conforms to numeric protocol
> (Integer or FP) at runtime?
>
> func checkNumeric(_ value: T) {
> /* return true if vaiue is Integer or FP */
> /* this will n
> On Mar 14, 2017, at 4:15 AM, Quinn The Eskimo! via swift-users
> wrote:
>
>
> On 14 Mar 2017, at 06:02, Седых Александр via swift-users
> wrote:
>
>> Please, tell, where I can read about "Self" requirement in protocols?
>
> The thing that really clarified it for me was Dave Abrahams’s cl
> On Mar 11, 2017, at 3:12 PM, Edward Connell via swift-users
> wrote:
>
> Observations about difining an object
> • Structs can't inherit and classes shouldn't inherit, final concrete
> types should be flat
> • Protocols need to be adopted by the final concrete type, otherwise
>
I suspect this can't be done (at least not right now), but wanted to check.
I'd like to declare a class as a generic that meets a protocol and is also a
subclass of some specific type.
Something like class Foo (i.e., the T must be
both a NSManagedObject or subclass of it and conform to SomeProt
I’m teaching an iOS with Swift this semester and one of my students pointed out
that:
struct Person {
var firstName: String
var lastName: String
}
does create a default initializer that you can call as:
p = Person(firstName: “Dave”, lastName: “Reed”)
but if you write:
public struct Perso
This would probably be better-suited on the Xcode list than here as I think
it's a bug in Xcode.
I've had issues when trying out this new CoreData codegen feature. What fixes
it for me is to go to:
~/Library/Developer/Xcode/DerivedData
and delete the entire directory for the build of my projec
; in addition to class Event: NSManagedObject . . .
>>>
>>> Yes, I know in Xcode 8, that last part can now be written for you.
>>>
>>> Again, if this is the "right way to do it", I'm ok with that, I just
>>> wondered if there is a be
e Reed
> On Jan 5, 2017, at 2:35 PM, Pierre Monod-Broca
> wrote:
>
> Hello,
>
> It looks that you have what you wanted because Event.Entity is an alias of
> Event.
>
> Pierre
>
>> Le 5 janv. 2017 à 16:47, Dave Reed via swift-users a
>> écrit :
Is there a way to make a static or class method specify the return type be the
actual class it is called with?
The example code below using protocols/extensions mostly works (the type is
[Event.Entity] not [Event] but it seems to work.
If I try to make DDRCoreData a base class and Event subclas
> On Sep 28, 2016, at 3:22 AM, Cao Jiannan via swift-users
> wrote:
>
> Should I use private or fileprivate to declare global variables/consts in
> Swift 3? e.g.
>
> fileprivate let a = 1
> fileprivate class SomeClass {
> fileprivate b = 0
> }
>
> or
>
> private let a = 1
> private clas
; <https://developer.apple.com/reference/swift>
>
> You can also look up the documentation using the "Documentation and API
> Reference" menu in Xcode 8 Beta 6, as it's currently updated.
>
> Sincerely,
> Zachary Waldowski
> zach...@bignerdranch.com
>
I'm trying to convert the following code (from the Big Nerd Ranch's Freddy JSON
parser) that works in Xcode 8 beta 5 and convert it to work with beta 6.
Essentially it appears it needs to take a Data object and convert it to a
UnsafeBufferPointer if I understand it correctly.
/// Creates a
Makes sense. Thanks. :-)
Dave
> On Aug 2, 2016, at 12:24 PM, Jordan Rose wrote:
>
> That was pretty much the rationale for restoring “NS". :-)
>
>> On Aug 1, 2016, at 14:46, Dave Reed via swift-users
>> wrote:
>>
>> Ah, I thought there was already
> On Aug 1, 2016, at 8:28 PM, Rick Mann via swift-users
> wrote:
>
> It sure seems natural.
>
> Is there some reason the language can't allow a sub-struct to add member
> variables, such that the whole is treated like a contiguous set of members?
>
> In my case, I have a rect-like value type
https://github.com/apple/swift-evolution/blob/master/proposals/0086-drop-foundation-ns.md
> &&
> https://github.com/apple/swift-evolution/commit/bea5eab614b954775754639fb83a957a180152e1#diff-e260ca20577a1e205ea0b72456a21b7f
>
> On Mon, Aug 1, 2016 at 2:23 PM Dave Reed via swif
I was updating my project from beta 3 to beta 4 today and it seems
AttributedString disappeared. Changing it to NSAttributedString fixed it.
I don't see anything in the Release Notes about AttributedString.
Is it gone permanently? Or am I doing something wrong?
Thanks,
Dave Reed
_
> On Jul 30, 2016, at 1:36 PM, smd via swift-users
> wrote:
>
> Hello
>
> I’m interested in learning Swift. Is there a need or benefit to learn
> Objective-C first? I’ve done some C, C++, VB 6.0, and VBA / Access in the
> past but I’m definitely not a programmer. I want to develop programs f
> On Jun 17, 2016, at 12:28 PM, Joe Groff wrote:
>
>
>> On Jun 16, 2016, at 1:49 PM, Dave Reed via swift-users
>> wrote:
>>
>> I've got a project I had been working on using Swift2.2 and decided to
>> migrate to Swift3 (using Xcode 8
a bug report?
>
> -- E
>
>> On Jun 16, 2016, at 2:59 PM, Dave Reed via swift-users
>> wrote:
>>
>>
>> Joe,
>>
>> I had an expression that worked fine with Swift2.2 but Swift3 (Xcode 8
>> version) complains it's too complex:
&
Joe,
I had an expression that worked fine with Swift2.2 but Swift3 (Xcode 8 version)
complains it's too complex:
The variables are of type CGPoint and the function returns a Bool.
return (pt.x - p0.x) * (p1.y - p0.y) - (pt.y - p0.y) * (p1.x - p0.x) < 0.0
Thanks,
Dave
> On Jun 6, 2016,
I've got a project I had been working on using Swift2.2 and decided to migrate
to Swift3 (using Xcode 8 beta) before the project gets any bigger. I
successfully migrated everything except I have a CGContext for writing to a PDF
and calls the endPage() method. For that the compiler responds with
> On Apr 14, 2016, at 4:58 PM, Jens Alfke via swift-users
> wrote:
>
> It appears that you can’t extend a generic class/struct with a requirement
> that a type parameter inherit from a non-protocol:
> extension Dictionary where Key : String { … }
> The above produces the error “Type ‘Key
23 matches
Mail list logo