Search results for

Swift 6

49,193 results found

Post

Replies

Boosts

Views

Activity

Menu item actions not firing
I originally posted this in the old Developer Forums, but didn't get a response there.I have an app written in Swift with a WatchKit 1 (i.e. not beta) extension. I have a few different actions that I want to connect to menu items.The problem is, more often than not, hitting the menu item fails to fire the action. Sometimes it works once; usually it doesn't work at all. Buttons connected to the same actions work perfectly, but I don't want visible buttons in the UI for these features. The problem is not with the code in the action failing to have an effect—a breakpoint in the action is not hit. Has anyone seen anything like this before? Any idea what might be causing it?
2
0
853
Jun ’15
Reply to Generics?
There is some information hereon how collections typed using generics are imported into Swift (look under Lightweight Generics).Does Lightweight maybe mean I can't create my own generic classes; just use NSArray<T>, NSSet<T>, NSDictionary<T>?
Topic: Programming Languages SubTopic: General Tags:
Jun ’15
NSDateFormatter replacing colons with dots
Hi allI just put iOS 9 on a device and downloaded my app from the app store.The affected code is swift code.When i use a dateformatter with format:yyyy-MM-dd'T'HH:mm:ss.SSSSSZZZIt translates to2015-05-30T10.52.00.00000+0200 instead of 2015-05-30T10:52:00.00000+0200Anyone else experiencing this?I am using a very specific format here, the colons are specified directly, its pretty crazy they would turn into dots...I have not download the new xcode yet so i haven't seen it in debug mode, but this is what is sent to my backend server from iOS 9.Thanks in advance
4
0
661
Jun ’15
Reply to How compile ios 8 app for iphone ios 9
Ad hoc distribution is the supported mechanism to use if you want to build using an old version of Xcode and load the application onto a device too new for that version of Xcode.There are hackish work arounds involving swapping between Xcode 6 and Xcode 7, but that's likely to cause handshaking problems with the device.
Jun ’15
Voice Over speed in swift
Hi, is there any way to get the current speed of the voice over speech in swift? I am developing an accessible app and I have to use AVSpeechSynthesizer in some cases, but I would want to set the same speech rate that voice over has set, or at least very similar. Thanks in advance!
0
0
353
Jun ’15
Generics in Cocoa and half-way bridging
The NSAttributedString(string:attributes:) constructor has been updated with generics in Swift 2.0 so that the attributes parameter is of the type [String : AnyObject]?However, this means that the following code doesn't work anymore: let font = CTFontCreateWithName(Monaco, 10, nil) let string = NSAttributedString(string: foo, attributes: [kCTFontAttributeName : font])The problem here is that kCTFontAttributeName has the type CFString, which is not automatically bridged to String, even though it's going to be immediately converted back to a CFString.The workaround is to convert it manually: let font = CTFontCreateWithName(Monaco, 10, nil) let string = NSAttributedString(string: foo, attributes: [String(kCTFontAttributeName) : font])
3
0
472
Jun ’15
Dynamically link command line tool against swift libraries
I have a bunch of command line tools all installed together (via an installer package) and I would like to avoid having 5MB of swift libraries embedded in each one of them. Is it possible for all my binaries to dynamically link against the same set of libraries? I looked into the build settings but can't find any switch from static to dynamic linking.
0
0
351
Jun ’15
iBooks won't open a book
[Retina MacBook Pro 15, model 10,1]Since installing El Capitan, iBooks opens and allows me to see my library, download existing purchases etc, but won't let me read any of them:- open iBooks- double-click on any of the books (for example The Swift Programming Language from Apple)- mouse cursor disappears- nothing else happensAfter that,- moving the mouse restores the mouse cursor- iBooks seems to continue functioning normally (you can select books, change category etc) apart from this inability to open a bookAnyone else?
5
0
2.9k
Jun ’15
Low sound
On my iPad Mini 3 the sound that is coming out of the speakers is very low. The volume level is set to max and limit volume is off. Can hardly hear the lock sound when locking. Music is quiet and so are videos in Safari. All was fine in iOS 8.3. Only started when installed the beta. I also have the beta in my iPhone 6 and that is fine. Only effecting iPad Mini 3.
3
0
887
Jun ’15
Xcode Upgrade
Hello Developers,I just updated to Xcode 7 and opened up my project which i started a couple months ago on 6.3 using Swift. I'm now getting hundreds of error codes, some of them i have never herd of, anyone know why?
1
0
416
Jun ’15
Reply to Xcode Upgrade
Yes, this happened with my app too and this is expected due to the change to swift 2.0 and ios 9 API changes. You will need to read through the errors and resolve them with the help of research and reading through apple documentation. I would suggest also looking at the swift 2.0 prerelease ibook. Helpful links-https://developer.apple.com/library/prerelease/ios/navigation/https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-SW1https://developer.apple.com/library/mac/documentation/Swift/Conceptual/Swift_Programming_Language/OptionalChaining.html#//apple_ref/doc/uid/TP40014097-CH21-ID245https://itunes.apple.com/us/book/swift-programming-language/id1002622538?mt=11
Jun ’15