Also noticed that when Xcode prompts to fill the missing case statements, it
fills it with the deprecated TouchID case statements (in an iOS 11 project).
> On 5 Nov 2017, at 5:14 PM, Dennis Weissmann via swift-users
> wrote:
>
> Hi Charles,
>
> You are right (the
Or you could try "\\E"
Thanks and regards,
Muthu
> On 3 Nov 2017, at 12:01 AM, C. Keith Ray via swift-users
> wrote:
>
> try "\u{1b}"
>
> --
> C. Keith Ray
> Senior Software Engineer / Trainer / Agile Coach
> *
n 15 Jun 2017, at 10:27 am, Tony Parker via swift-users
>>>> <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
>>>>
>>>> Hi Somu,
>>>>
>>>> You can certainly file a bug for us. It may be something we are alre
Hi Kenny,
You could use a lazy var and initialise it with a closure.
class PDAudioPlayer {
//Would be created lazily when first invoked
lazy var mQueue : AudioQueueRef = {
//create an audioQueue and return that instance
return audioQueue
}()
}
Thanks and regards,
AM, somu subscribe via swift-users
> <swift-users@swift.org> wrote:
>
> Hi,
>
> When using Generics with Protocols I get a compilation error depending on
> whether or not conformance to a protocol is defined in the same file or not.
>
> Error:
> Type 'Car.It
Hi,
When using Generics with Protocols I get a compilation error depending on
whether or not conformance to a protocol is defined in the same file or not.
Error:
Type 'Car.ItemID' (aka 'CarID') does not conform to protocol 'P2'
I have 2 swift files:
- CarID.swift
- CreateCars.swift
Not sure why it is happening, but given below are my observations:
Simplified version:
var array = [1, 2, 3, 4, 5]
_ = array.popFirst() //error: cannot use mutating member on immutable value:
'array' is immutable
_ = array.popLast() //works ok
popFirst is not available in the Array
10b86c8)
Thanks and regards,
Muthu
> On 13 Sep 2017, at 5:12 AM, Jordan Rose <jordan_r...@apple.com> wrote:
>
>
>
>> On Sep 12, 2017, at 10:20, Andrew Trick via swift-users
>> <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
>>
&
lt;atr...@apple.com> wrote:
>
>>
>> On Sep 12, 2017, at 9:55 AM, somu subscribe via swift-users
>> <swift-users@swift.org> wrote:
>>
>> Hi Quinn,
>>
>> Thanks for the reply,
>>
>> It is an iOS Swift project (uses Foundation
Hi,
I would like to know the correct way to get the memory address of value types
and reference types.
Given below are the attempts made.
class C {}
struct S {}
let c1 = C()
var s1 = S()
var s2 = s1
//Reference type:
print("c1 address: \(Unmanaged.passUnretained(c1).toOpaque())") //Is this
Hi Nikita,
See if the below implementation fits your needs:
protocol P1 {}
protocol P2 : P1 where T : P1 {
associatedtype T
var input : T { get }
}
struct S1 : P1 {}
struct S2 : P2 {
typealias T = S1
var input: T
}
Regards,
Muthu
> On 30 Aug 2017, at
).
Thanks and regards,
Muthu
> On 31 Jul 2017, at 4:27 AM, Hooman Mehr <hoo...@mac.com> wrote:
>
>>
>> On Jul 24, 2017, at 2:38 AM, somu subscribe via swift-users
>> <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
>>
>> Th
on requires exclusive access.
> }
> }
> }
>
> Zhao Xin
>
> On Mon, Jul 24, 2017 at 4:22 PM, Quinn "The Eskimo!" via swift-users
> <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
>
> On 24 Jul 2017, at 07:04, somu subscr
Thanks Joanna Carter, sorry forgot to mention it uses generics, so would
contain associatedtype if protocol is used.
Is the below mentioned approach the usual way to hide implementation details or
is there a better approach ?
With this approach, I had to pass functions of C1 as closures into
(hiding implementation details) normally tackled using Helper
class (or struct) or is there a more better approach ?
Thanks and regards,
Muthu
> On 24 Jul 2017, at 4:14 PM, Quinn The Eskimo! via swift-users
> <swift-users@swift.org> wrote:
>
>
> On 24 Jul 2017, at 07:0
Hi,
I am having trouble with the below mentioned code.
It crashes in Xcode 9.0 beta 3 (9M174d) but doesn’t crash in Xcode 8.3.3
(8E3004b)
Observations in Xcode 9:
- When Car is changed into a struct and test is made to be mutating, it doesn’t
crash
- When Helper is changed to class, it
Hi Taylor,
If both Source and Displacement are going to be Noise, you could use just one
placeholder type.
class Noise {}
struct DistortedNoise where Item:Noise
{
let source:Item,
displacement:Item
init(source:Item, displacement:Item)
{
self.source = source
Create a struct for Metadata and conform to Coding
Code:
let string = """
{
"id": "4yq6txdpfadhbaqnwp3",
"email": "john@example.com",
"name":"John Doe",
"metadata": {
"link_id": "linked-id",
"buy_count": 4
}
}
"""
let data = string.data(using: .utf8)! //Force unwrapping
> tracking or already fixed, but the bug report will let us double check that.
>
> Thanks,
> - Tony
>
>> On Jun 13, 2017, at 12:33 PM, somu subscribe via swift-users
>> <swift-users@swift.org> wrote:
>>
>> Thanks a lot Jordan for pointing out the r
nstead
> of storing to a private property.
>
> Hope that helps,
> Jordan
>
>
>> On Jun 13, 2017, at 06:40, somu subscribe via swift-users
>> <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
>>
>> Hi,
>>
>> I am hav
Hi,
I am having trouble using KeyPath to KVC (Key Value Code) in Swift 4.
I have a subclass of Operation and I am overriding the isFinished and
isExecuting property.
Problem:
- When I use KeyPath, the completionBlock of the operation is not invoked.
- However when I use String instead of
21 matches
Mail list logo