Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Decoding a string with decodeObjectOfClass in Xcode 7 beta1 ?
Hi all,How are you supposed to call decodeObjectForClass to get a String, in Swift 2 ? Currently with Xcode 7 beta 1, I can get the call to compile. I tryattr1 = aDecoder.decodeObjectOfClass(String.self, forKey: attr1)which fails withCannot invoke 'decodeObjectOfClass' with an argument list of type '(String.Type, forKey: String)'fair enough, String is a struct, so let's try NSString :attr = aDecoder.decodeObjectOfClass(NSString.self, forKey: attr)but that fails withMissing argument for parameter 'error' in callwhich is really weird. Do I log a radar ?Thanks
2
0
800
Jun ’15
Serialized SKActions
I created a new Sprite Kit Action using New File..., which generted a file called MyAction.sks, but I'm not sure what to do with the file. I figured out how to use the editor to add actions to it from the Action list, but I'm not sure what good these are without any context, i.e., scene objects to act on. Is there a tutorial somewhere or an explanation about how to use these?
2
0
836
Jun ’15
Xcode 7 simulator performance
If I start an iOS 9 debug session on a simulator (e.g. iPhone 6) from XCode 7, it needs minutes until I can see something, but not the running app, instead always the message error: failed to attach to process ID .... The splash screen occurs for a moment, but the app will not start. Sometimes if I wait 5 to ten minutes, it starts. This is also for small apps, like sample apps from WWDC. Is the problem my old iMac? It is a mid 2007 with 4GB RAM and a 2.4 GHz core 2 duo, Yosemite.If I got it run, it runs faster after changes in source code. But I got only iPhone apps to run, not Apple Watch apps (possibly if I wait an hour?)
0
0
537
Jun ’15
swift app in purchase help
I am using IAPS but every time i click on one it only comes up with add 3 rather than the correct amount. i am using swift 2 here is my code://///// import UIKitimport iAdimport StoreKitclass ViewController4: UIViewController, ADBannerViewDelegate, SKProductsRequestDelegate, SKPaymentTransactionObserver { @IBOutlet var s3: UIButton! @IBOutlet var s6: UIButton! @IBOutlet var s13: UIButton! @IBOutlet var s22: UIButton! @IBOutlet var s30: UIButton! @IBOutlet var s45: UIButton! @IBOutlet var s60: UIButton! @IBOutlet var s100: UIButton! @IBOutlet var rf: UIButton! @IBOutlet var ise: UIButton! @IBOutlet var info: UIButton! @IBOutlet var home: UIButton! @IBOutlet var banner: ADBannerView! @IBOutlet var restore: UIButton! override func viewDidLoad() { super.viewDidLoad() s3.layer.cornerRadius = 10 s6.layer.cornerRadius = 10 s13.layer.cornerRadius = 10 s22.layer.cornerRadius = 10 s30.layer.cornerRadius = 10 s45.layer.cornerRadius = 10 s60.layer.cornerRadius = 10 s100.layer.cornerRadius = 10 rf.layer.cornerRadius = 10
1
0
275
Jun ’15
Reply to openMP
OpenMP is being integrated into clang/LLVM, but I don't know what the shipping status of that code is, especially for Apple's versions of clang/LLVM. You can check Clang's dev mailing list for relevant posts: http://lists.cs.uiuc.edu/pipermail/cfe-dev/
Jun ’15
Reply to Xcode uploading
If by upload the output you mean build and run a project/app - which version Xcode are you using?Xcode can build to any compatible, properly provisioned, connected devices as listed in the Member Center/Certificates, Identifiers & Profile/Devices. If you iPad mini isn't shown as available, there is a reason why, so begin by seeing what's different about it from your other devices that are listed.
Jun ’15
Songs stuck on download
iPhone 6+ running 9.0 (13A4254v).Selected some albums Make All Songs Available Offline. However, progress bar says Downloading X songs and has been stuck there for a couple of hours. Restarted the app. Restarted iPhone. Did a hard boot of iPhone (power + home button). Still the same. When I tap on Downloading X songs I see the list of songs in the queue, but the progress circle is spinning on every one. I.e., no clear download progress. Internet is up.Any suggestions on how to prod it into life or if not, clear the queue and try again?Thanks
1
0
11k
Jun ’15
Reply to Where is Content Blocker Extensions documentation?
I don't think this is working for me, am I doing something wrong?... I create a new iOS app (single-page), then add a content blocking extension. The json file has the default rule that blocks the gold icon on the webkit.org page. Then I run the extension's scheme, select Safari from the list, I go to webkit.org, and the logo is displayed normally. (I'm testing on the simulator.) The extension is also automatically turned on in the settings (as a matter of fact, I can't even turn it off if it's running).There also doesn't seem to be any way to see errors in the extension - if I make the JSON invalid, it works exactly the same (i.e. it doesn't work).
Topic: Safari & Web SubTopic: General Tags:
Jun ’15
guarding on enum value
I am attepting to guard depending on the value of an enum...This is a contrived example so bear with me...public struct Invoice { public enum EmailStatus { case NeverSent case SentPaymentDueNotice(attempts: Int) case SentPaidNotice } public var name: String public var email: String public var total: Float public var paid: Bool public var emailStatus: EmailStatus }I would like to do something like the following...public func email(invoice: Invoice) throws { guard case .SentPaidNotice != invoice.emailStatus else { // ERROR: Variable binding in a condition requires an initializer throw EmailError.AlreadySentPaidNotice } print(Sending invoice to(invoice.name) <(invoice.email)>) }Unfortunately I can only seem to get this working with the compilerpublic func email(invoice: Invoice) throws { guard case .SentPaidNotice = invoice.emailStatus else { throw EmailError.AlreadySentPaidNotice } print(Sending invoice to (invoice.name) <(invoice.email)>) }Which is the inverse of what I want. I can only get this be
11
0
6.7k
Jun ’15
Reply to Solutions for Better Battery Life on Beta 1 - Confirmed for Mult. Devices
Thanks for the feedback tweeling, There was one step which we performed on some but not all devices. Two devices in our lab had some data corruption relative to installer/uninstaller garbage that wasd persistent in the settings. These devices also appeared to exhibit persistent battery drain. In another thread someone had suggested doing another restore or update to iOS 9.0 Beta 1 without doing a backup restore would resolve certain issues, however it is possible that this additional step is what might be contributing to the generally positive impact we have seen in the lab. Again, it's not perfect and it will likely be improved in subsequent betas, but in the event that the next beta is delayed this might help get some people through another week with less stress. Good luck and thanks again for contributing to the discussion.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Beta 4 No recents or notification sounds
Hi has anyone else come across this problem?iPhone6 since the Beta 4 install has no recent calls list and im not getting any notification sounds.All the sounds are set and availible on the phone but never sound off.... weirdAll was fine in B3 but after the install of B4 lost the recents and sounds, I have installed 8.3 and all works then upgrade to B4 and its gone again. I have done a clean install of B4 from itunes and no difference. I know its only a minor bug but its annoying for me.Any ideas?CheersMarc
0
0
244
Jun ’15
Should LazySequence be a protocol?
So I'm currently noodling around with the standard library, extending every protocol I can find, all that good stuff. Four structs caught my eye:LazySequenceLazyForwardCollectionLazyBidirectionalCollectionLazyRandomAccessCollectionThey're the sequences and collections that have lazy implementations of map() and filter(). To get them from eager/static sequences you just call lazy() on the sequence.So say I wanted to write a function that operates lazily on these sequences - something like scan()/accumulate(), or interpose(), or whatever. Something like:extension SequenceType { func scan<T>(initial: T, combine: (T, Generator.Element) -> T) -> LazyScanSeq<Self, T> { return LazyScanSeq(seq: self, combine: combine, initial: initial) } }I can have my own struct LazyScanSeq, like FilterCollectionView, etc. I can have it lazily evaluate its sequence. And it's available on all sequences, so it works fine. Unless I want to have an eager version, like this:extension SequenceType { func scan<T>(va
0
0
277
Jun ’15