Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

165,591 results found

Post

Replies

Boosts

Views

Activity

NSOutlineView with 2 columns
Hi, ALL,I am developing an application and I need to create NSOutlineView. I need it to look like the List Control (not a Tree Control). I need the control to not to have the column header. I also need the control to have 2 columns as follows:Second column will have a constant width (lets say 100 - this is not the actual width). It will be permanent for all rows in control.First column (the leftmost one) will have a width of (view_width - width_of_second_column).First column will contain the strings of the different width. The second column will contain the checkbox with the labelThere will be no horizontal scrollbar visible - the strings will be short enough to fit in the column.And as I said before - the control will not have a column header.Is creating such control with such layout possible?My understanding is that I can do something like this:[m_OutlineView setColumnAutoresizingStyle:NSTableViewSequentialColumnAutoresizingStyle];[column resizingMask:NSTableColumnAutoresizingMask];[m_OutlineView s
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
693
Jun ’20
Airplay 2 implementation on Linux
Hi all, I am looking for the information about the Airplay2 (client) implementation on linux but there aren't much info about it. As far as I searched on the internet, it seems possible to implement it on the linux by Swift which is cross platform supported solution, but I wonder what the specific procedure for developing Airplay 2 on the linux . Is Apple providing Airplay2 source code in Swift form? Is there any detail guide about this? if there's is any person who have experience about it, please share the information. Thanks.
0
0
1.5k
Oct ’21
CloudKit and Swift 2
I am trying to simultaiously learn iOS, Swift 2, x-code, and how to use CloudKit (yeah, unlikely). This is frustrating due to lack of Swift 2.0 examples provided by Apple and the fact that there's a lot of out-of-date info on the web. I have this code trying to get data out of the Cloud. Lines 40 & 41 throw consecutive statements on a line must be separated by ';' I don't understand the reason. I suspect I am conflating two different ways of using CloudKit in trying to hack something together from various examples. I can get records out from iCloud, but I am struggling to understand how to get data out, that is, what's in values={ . . . }}> as shown in output at line 38.If someone could point me in the direction of getting ICloudKit to work, I'd be greatful.import Foundation import CloudKit protocol CloudKitDelegate { func errorUpdating(error: NSError) func modelUpdated() } class MovieDataBase { var container : CKContainer var publicDB : CKDatabase let privateDB : CK
2
0
725
Oct ’15
Reply to Does Swift Playgrounds for iPad exist?
From the iOS 10 b2 Release Notes:Swift Playgrounds Swift Playgrounds is a brand new app designed to help people learn to code with Swift 3. It offers downloadable content, including Learn to Code Part 1—which teaches the fundamentals of coding in Swift—and additional challenges you can explore. You can also experiment on your own by creating playgrounds based on the templates, create a blank playground, or open playgrounds created in Xcode.Swift Playgrounds is included with iOS 10 beta 2 and up.Swift Playgrounds beta 2 contains Learn to Code Part 1. Learn to Code Part 2 is coming in later releases.Connect to Wi-Fi to download the Learn to Code and Challenge content. Cellular downloads are not supported.
Jul ’16
Reply to Swift 4.2 code only runs once...
Hi All,I have cracked it.Simply delay code execution using the Dispatch framework. GDC framework.> DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) {> runagain() //this runs my code in the main thread.> //this code will be executed only after 2 seconds have been passed , I will eventually make this longer because I dont need to poll sensor as often. > }
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’18
Chapter 2 Side Quest Output
I’m confused with the Chapter 2 Side Quest - is the swan supposed to recognize a correct solution to the side quest or does it only give a “success” dialog when you complete the main quest? I think my solution is correct, but the swan only seems to say “you are so close, please try again”. My code for the side quest below (also contains solution to main quest via commented line). // Touch Run My Code to continue your quest... func performance(owner: Assessable) { let toneOutput = ToneOutput() // C4, D4, E4, F4, G4, A4, B4, C5 let cMajorScale = [261.63, 293.66, 329.63, 349.23, 392.00, 440.00, 493.88, 523.25] // F4, G4, A4, Bb, C5, D5, E5, F5 let fMajorScale = [349.23, 392.0, 440.0, 466.16, 261.63 * 2, 293.66 * 2, 329.63 * 2, 349.23 * 2] // var scaleToPlay = cMajorScale.makeIterator() // main quest var scaleToPlay = fMajorScale.makeIterator() // side quest Timer.scheduledTimer(withTimeInterval: 0.4, repeats: true) { timer in guard let frequency = sc
1
0
542
Jun ’20
Reply to Problem when using "if" statement in SwiftUI
the following code fails to compileYou should better show the error message, and more details to reproduce the issue.As you found, a slight change make your code compile successfully, so some this-code-compiles examples would not solve your problem.As far as I tried, this code compiles. var body: some View { VStack(alignment: .leading) { ForEach(0 ..< self.halfNumber) { index in BookItemGroupHorizontal(items: [self.items[index * 2], self.items[index * 2 + 1]] as [BudgetBook]) } if items.count % 2 == 1 { Text(it) } } }But I do not know what's happening inside the Swift compiler and cannot be sure if this solves your issue or not.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’20
Learn to code
Hello Developers, I started learning how to code using Swift PlayGround on my iPad Pro. But in some levels , you know, there are no hints to anything to help you solve problems. Do you have any idea on how to learn coding from the beginning cuz I feel lost sometimes and I’m in (learn to code 2) level and I didn’t see how to take advantage of using what I’ve learned on an app, I’m not planning to develop a Game, although coding looks like a game to me ☺️, so can you help me guys on how and where to learn good, and what do you think of the Swift Playground as a start or is there a better way. !! thanks
1
0
678
Feb ’22
two finger tap - trackpad
I just installed the GM for El Capitan, and it appers that the two finger tap (not click) is no longer working on the external trackpad? I used to be able to just two finger touch the track pad and it would bring up the context menu. Now I have to actually click the trackpad with 2 fingers?
4
0
953
Sep ’15
Regex code from WWDC sample code not working
If I past the samele code import RegexBuilder let fieldSeparator = /s{2,}|t/ let transactionMatcher = Regex { /CREDIT|DEBIT/ fieldSeparator One(.date(.numeric, locale: Locale(identifier: en_US), timeZone: .gmt)) fieldSeparator OneOrMore { NegativeLookahead { fieldSeparator } CharacterClass.any } fieldSeparator One(.localizedCurrency(code: USD).locale(Locale(identifier: en_US))) } It does not like the OneOrMore with the negative look ahead. Is there an updated example of this code from WWDC?
1
0
1.3k
Jun ’22
NSOutlineView with 2 columns
Hi, ALL,I am developing an application and I need to create NSOutlineView. I need it to look like the List Control (not a Tree Control). I need the control to not to have the column header. I also need the control to have 2 columns as follows:Second column will have a constant width (lets say 100 - this is not the actual width). It will be permanent for all rows in control.First column (the leftmost one) will have a width of (view_width - width_of_second_column).First column will contain the strings of the different width. The second column will contain the checkbox with the labelThere will be no horizontal scrollbar visible - the strings will be short enough to fit in the column.And as I said before - the control will not have a column header.Is creating such control with such layout possible?My understanding is that I can do something like this:[m_OutlineView setColumnAutoresizingStyle:NSTableViewSequentialColumnAutoresizingStyle];[column resizingMask:NSTableColumnAutoresizingMask];[m_OutlineView s
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
1
Boosts
0
Views
693
Activity
Jun ’20
Airplay 2 implementation on Linux
Hi all, I am looking for the information about the Airplay2 (client) implementation on linux but there aren't much info about it. As far as I searched on the internet, it seems possible to implement it on the linux by Swift which is cross platform supported solution, but I wonder what the specific procedure for developing Airplay 2 on the linux . Is Apple providing Airplay2 source code in Swift form? Is there any detail guide about this? if there's is any person who have experience about it, please share the information. Thanks.
Replies
0
Boosts
0
Views
1.5k
Activity
Oct ’21
CloudKit and Swift 2
I am trying to simultaiously learn iOS, Swift 2, x-code, and how to use CloudKit (yeah, unlikely). This is frustrating due to lack of Swift 2.0 examples provided by Apple and the fact that there's a lot of out-of-date info on the web. I have this code trying to get data out of the Cloud. Lines 40 & 41 throw consecutive statements on a line must be separated by ';' I don't understand the reason. I suspect I am conflating two different ways of using CloudKit in trying to hack something together from various examples. I can get records out from iCloud, but I am struggling to understand how to get data out, that is, what's in values={ . . . }}> as shown in output at line 38.If someone could point me in the direction of getting ICloudKit to work, I'd be greatful.import Foundation import CloudKit protocol CloudKitDelegate { func errorUpdating(error: NSError) func modelUpdated() } class MovieDataBase { var container : CKContainer var publicDB : CKDatabase let privateDB : CK
Replies
2
Boosts
0
Views
725
Activity
Oct ’15
Reply to Does Swift Playgrounds for iPad exist?
From the iOS 10 b2 Release Notes:Swift Playgrounds Swift Playgrounds is a brand new app designed to help people learn to code with Swift 3. It offers downloadable content, including Learn to Code Part 1—which teaches the fundamentals of coding in Swift—and additional challenges you can explore. You can also experiment on your own by creating playgrounds based on the templates, create a blank playground, or open playgrounds created in Xcode.Swift Playgrounds is included with iOS 10 beta 2 and up.Swift Playgrounds beta 2 contains Learn to Code Part 1. Learn to Code Part 2 is coming in later releases.Connect to Wi-Fi to download the Learn to Code and Challenge content. Cellular downloads are not supported.
Replies
Boosts
Views
Activity
Jul ’16
Reply to Swift 4.2 code only runs once...
Hi All,I have cracked it.Simply delay code execution using the Dispatch framework. GDC framework.> DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) {> runagain() //this runs my code in the main thread.> //this code will be executed only after 2 seconds have been passed , I will eventually make this longer because I dont need to poll sensor as often. > }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’18
Chapter 2 Side Quest Output
I’m confused with the Chapter 2 Side Quest - is the swan supposed to recognize a correct solution to the side quest or does it only give a “success” dialog when you complete the main quest? I think my solution is correct, but the swan only seems to say “you are so close, please try again”. My code for the side quest below (also contains solution to main quest via commented line). // Touch Run My Code to continue your quest... func performance(owner: Assessable) { let toneOutput = ToneOutput() // C4, D4, E4, F4, G4, A4, B4, C5 let cMajorScale = [261.63, 293.66, 329.63, 349.23, 392.00, 440.00, 493.88, 523.25] // F4, G4, A4, Bb, C5, D5, E5, F5 let fMajorScale = [349.23, 392.0, 440.0, 466.16, 261.63 * 2, 293.66 * 2, 329.63 * 2, 349.23 * 2] // var scaleToPlay = cMajorScale.makeIterator() // main quest var scaleToPlay = fMajorScale.makeIterator() // side quest Timer.scheduledTimer(withTimeInterval: 0.4, repeats: true) { timer in guard let frequency = sc
Replies
1
Boosts
0
Views
542
Activity
Jun ’20
Reply to Problem when using "if" statement in SwiftUI
the following code fails to compileYou should better show the error message, and more details to reproduce the issue.As you found, a slight change make your code compile successfully, so some this-code-compiles examples would not solve your problem.As far as I tried, this code compiles. var body: some View { VStack(alignment: .leading) { ForEach(0 ..< self.halfNumber) { index in BookItemGroupHorizontal(items: [self.items[index * 2], self.items[index * 2 + 1]] as [BudgetBook]) } if items.count % 2 == 1 { Text(it) } } }But I do not know what's happening inside the Swift compiler and cannot be sure if this solves your issue or not.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’20
Learn to code
Hello Developers, I started learning how to code using Swift PlayGround on my iPad Pro. But in some levels , you know, there are no hints to anything to help you solve problems. Do you have any idea on how to learn coding from the beginning cuz I feel lost sometimes and I’m in (learn to code 2) level and I didn’t see how to take advantage of using what I’ve learned on an app, I’m not planning to develop a Game, although coding looks like a game to me ☺️, so can you help me guys on how and where to learn good, and what do you think of the Swift Playground as a start or is there a better way. !! thanks
Replies
1
Boosts
0
Views
678
Activity
Feb ’22
two finger tap - trackpad
I just installed the GM for El Capitan, and it appers that the two finger tap (not click) is no longer working on the external trackpad? I used to be able to just two finger touch the track pad and it would bring up the context menu. Now I have to actually click the trackpad with 2 fingers?
Replies
4
Boosts
0
Views
953
Activity
Sep ’15
Regex code from WWDC sample code not working
If I past the samele code import RegexBuilder let fieldSeparator = /s{2,}|t/ let transactionMatcher = Regex { /CREDIT|DEBIT/ fieldSeparator One(.date(.numeric, locale: Locale(identifier: en_US), timeZone: .gmt)) fieldSeparator OneOrMore { NegativeLookahead { fieldSeparator } CharacterClass.any } fieldSeparator One(.localizedCurrency(code: USD).locale(Locale(identifier: en_US))) } It does not like the OneOrMore with the negative look ahead. Is there an updated example of this code from WWDC?
Replies
1
Boosts
0
Views
1.3k
Activity
Jun ’22