Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to Can't build and run watchOS 2
I unpaired and re-paired my Watch to my phone per the recommendation here. This took quite a while (over an hour?) for the Watch to recover from as it had to undergo a restore (unfortunately losing my activity information in the process).After it came back to life and I got the Trust/Don't Trust dialog after firing up Xcode, it took another several hours before Xcode finally recognized my phone + Watch as a viable target. Xcode crashed constantly, as well. I was just about to head home for the day when I tried debugging my app one more time and ... it worked!If I have to do this again, I believe the solution to saving the activity data is to perform an encrypted backup to iTunes first, and then unpair/pair.Regardless, thank you for this solution, @MrBit!
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to Any news on reflection in Swift 2.0?
Sorry, meant to come back to this thread days ago...As others have noted, Swift 2 doesn't seem to support what you want it to do. I see a workaround, though... There's still boilerplate code, but it seems less error-prone to meFirst, we need a way to iterate over the enum cases (and provide their default values):class StoryBookStateGenerator : AnyGenerator<StoryBookState> { var optcase:StoryBookState? = nil override func next() -> Generator.Element? { if let cas = optcase { switch cas { case .Welcome: optcase = .Praise(nil, nil) case .Praise: optcase = .InvitationToRepeat(nil, nil) case .InvitationToRepeat: optcase = .TurnToNextPage(nil) case .TurnToNextPage: optcase = .End case .End: optcase = nil } } else { optcase = .Welcome(nil) } return optcase } }Second, we need a way to parse the source code and extract the case labels. For some reason, I couldn't get String(contentsOfFile) to work. Fortunately, someone on stackoverflow was kind enough to post a class that'll read each line of a file into a [S
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
How to get user-entered data?
Completely frustrated noob here. Surely this isn't as hard as it looks?I want to use a number entered by the user, perform a calculation on that number when a button is pressed, and send the result back to the screen.I have the code working that can use a string forced in by code, convert it to double, do the math and send the result to the screen. This simply adds 2.45 to the string 123.45 and sends the result 125.9 back as a string to my label for display, all when the button is pressed. Great.@IBAction func buttonPressed() { NSLog(Button Pressed) let decimalAsString = 123.45 let decimalAsDouble = NSNumberFormatter().numberFromString(decimalAsString as String)!.doubleValue TempLabel.text = (decimalAsDouble+2.45) }This simpler form also works:let decimalAsDouble = Double(decimalAsString)What I have been struggling with (for way too long) is how to get at the data that was entered into the UITextField. My UITextField uses a decimal pad for entry. I do not yet have code working that dismisses the keyb
4
0
624
Jun ’15
Upload from Xcode crashing
HelloYesterday I successfully uploaded a build to iTunes Connect from inside XCode Version 6.3.2 (6D2105), but today, every time I try to upload XCode crashes.I have tried cleaning, rebuilding, restarting my laptop.I am starting to think this is a bug in Xcode or some kind of change between how Xcode & the store interact to upload my build.Has anyone else seen this or something like it?Are there any work arounds to upload a build to the store?Thank youRayCRASH LOG:Process: Xcode [952]Path: /Applications/Xcode.app/Contents/MacOS/XcodeIdentifier: com.apple.dt.XcodeVersion: 6.3.2 (7718)Build Info: IDEFrameworks-7718000000000000~2App Item ID: 497799835App External ID: 812404257Code Type: X86-64 (Native)Parent Process: ??? [1]Responsible: Xcode [952]User ID: 501Date/Time: 2015-06-17 18:34:32.916 -0700OS Version: Mac OS X 10.10.3 (14D136)Report Version: 11Anonymous UUID: 37388F5A-50D7-FA67-C88B-B59927DE7E82Time Awake Since Boot: 620 secondsCrashed Thread: 17 Dispatch queue: NSOperationQueue 0x7fe241ba0b90 :: NS
6
0
1k
Jun ’15
Regarding performance issues after synchronization with CloudKit
Have someone, during CKAssets synchronization between the device and iCloud, had a serious slowdown in the seemingly unrelated to iCloud application elements? For example, is it possible that, in UINavigationViewController, pushViewController works slower than before? The only difference that I've been able to notice is in appealation to objects in iCloud. If yes, how to fix it?
0
0
58
Jun ’15
Reply to The new 'throws' keyword
I think the whole notion of `throws` as a suffix is very odd. It should be a prefix like everything else. We already commonly make declarations such as: @objc private final func myFunc() {} It would do no harm whatever to add `throws` to this list of prefixes: @objc private final throws func myFunction()
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to Decode object in WatchKit Extension
Hey,The dictionary you pass to the WCSession APIs accept property list types.if you take a look at the documentation for updateApplicationContext:error: it states that the method takes A dictionary of property list values. The Property list documentation lists what object types are accepted.So in your case, if you actually want to send your custom object you will have to serialize it to NSData and then put the NSData in the dictionary you pass to updateApplicationContext:error:. As an FYI; during the WWDC talk Introducing Watch Connectivity the presenters encouraged using serialization techniques that are compact, something NSKeyedArchiver is not, so best find some other means.One option would be to export the object as pure property list types and then reconstruct it on the receiving side by adding methods such as:- (instancetype)initWithPropertyListRepresentation:(NSDictionary *)plist; - (NSDictionary *)propertyListRepresentation;
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
"sideloading" an app. Xcode 7
I downloaded XCode7 and walked my way through the To Do List tutorials and now want to deploy my app onto my Iphone which apparently you can do with XCode 7. It still wants me to sign up for the developer program. There is one page on the web on how to do this, but I can't get it to work. Bourke says Enter your name but it wants me to sign up and enter that identity. Anyone know how to do this?I thought you could avoid the whole code siging thing. I just want an app for my personal use at this point.
0
0
406
Jun ’15
Reply to iOS 9 Beta battery life
It's a travesty on the whole. Some sort of background operation is chewing through CPU cycles, causing everything from an iPad to an iphone 6 (and Plus) to burn through battery in less than half a day. Sometimes it's drained an iPad Air 2 we have for testing within 3 hours from a full charge with zero on-time. Meaning, the device was in standby for 3 hours from a full charge then basically dead.Beyond this obvious battery problem is another of great concern regarding iCloud backups. MASSIVE storage loss on our iCloud accounts for test devices. One account has over 500 GB of the entire 1 TB available allocated to Backups and yet when you actually look at the list of backups there are only two devices with less than 20 GB in size each. Where is the rest of the storage going? More transparency for iCloud relative to backups should be made available especially when this is crippling development. We can't do anything to delete the data and have no eta on when this will be resolved, or if it will impact an
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to iOS 9 beta iCloud backup can't be deleted
Hi Parsa, I really think the engineer(s) writing the release notes missed a major issue. While they do mention that some backups may report failure and instead be successful, then go on to suggest syncing via itunes if this happens, they did NOT mention that backups would be locked with permissions that break any ability to delete, remove or replace them from iCloud. The current situation is that we have multiple accounts in our development team that have absolutely zero iCloud data left, requiring we either pay to upgrade the storage or live with it and pray it's fixed. While testing anything that requires iCloud storage is completely impossible. Or we have to create completely new accounts. Bottom line, everyone testing Beta 1 of iOS 9 should disable iCloud backups on ALL iOS devices (as a precaution) for each iCloud account that will be paired to a development device running iOS 9 prior to performing the system update to Beta 1. iCloud is tremendously broken with iOS 9 Beta 1 and it's a bit risky
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Metal improvments in iOS9
Is there a proper, definitive list of whats new/changed in Metal in iOS for iOS9? At the WWDC Whats new in Metal 1 talk they briefly put up a slide with a ton of features listed. e.g. Layer Select, Counting Occlusion Queires, Depth Clipping Support, Texture Barriers etc etc.Where is any of this documented? Best I found was the Whats new in IOS9 documenthttps://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.htmlwhich is unhelpfully vague.
1
0
415
Jun ’15
Reply to Decode object in WatchKit Extension
Thank you for your help.The hint with the property list is great, i gonna try that out.In the mean time i did some further research and found the main reason for the error message i got. As you suggested I did serialize my custom object to NSData using a NSKeyedArchiver in my iOS App. In my WatchApp i read out the NSData and deserialize it to my custom object using a NSKeyedUnarchiver. The problem there was that my NSKeyedUnarchiver was not able to deserialize a class named Events.Event (which is iosAppTarget.myCustomClass) since it has no access to a class with that name. It only knows the class EventsWatchKitExtension.Event (which is watchKitExtensionTarget.myCustomClass) and so it is not able to deserialize such an object. I assume that NSKeyArchiver/Unarchiver use kind of a key/value store with a string key for target.class and a class value. Since the keys between my iOS App and the WatchKit Extensions differ, the WatchKitExtension is not able to deserialize an object which is serialized by the
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
scan wifi access points
HiIn my ios app i need to present the list nearby wifi access points.When i read the forums, i understand this only can be achieved by using private framework.But i have seen Chromecast iOS App , lists wifi access points.How can this be done ?ThanksSanjay
3
0
3.6k
Jun ’15