Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

iOS 8.4 Beta - Unable to play Audiobooks using the [MPMusicPlayerController systemMusicPlayer]
Starting with the iOS 8.4 Beta, we are unable to playback Audiobooks using MPMusicPlayerController's systemMusicPlayer API. We've also tried with iPodMusicPlayer with the same result.It looks like the systemMusicPlayer still commands the Music App, but with Audiobooks moved to iBooks, there doesn't seem to be a way to play Audiobooks anymore. We can continue to see the list of Audiobooks using MPMediaQuery APIs.Starting with iOS 8.4, what is the new way to play Audiobooks? Is there a new API? or is this a bug in iOS 8.4 beta?Thanks,Ronak PatelPS We came to WWDC as well; but were unable to find any Apple Engineers that were familiar with the MPMediaLibrary APIs.
5
0
787
Jun ’15
Container controllers and viewWillTransitionToSize:
Hi,I have been using Autolayout and size classes for a while, but I still seem to get confuse with how viewWillTransitionToSize: and sizeForChildContentContainer: work when used in custom container controllers and in container views with Interface Builder.My specific question is: how do you calculate a child controller size defined with constraints? (for -sizeForChildContentContainer:withParentContentSize: ) moreover when -viewWillTransitionToSize: run before the constraint and layout cycle.By default viewWillTransitionToSize:withTransitionCoordinator seems to perform the following (more things seems to be going on with presentedViewControllers, but it is not important for the matter at hand).- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id <UIViewControllerTransitionCoordinator>)coord { for (UIViewController* child in self.childViewControllers { CGSize const childSize = [self sizeForChildContentContainer:child withParentContentSize:size]; [child viewWillTransitionToS
Topic: UI Frameworks SubTopic: UIKit Tags:
3
0
1.9k
Jun ’15
Reply to Xcode 6.3.2 "forgetting" source control
FInally figured a workaround of sorts. Xcode seems to be picking up on another SVN repository that I have that is completely unrelated to my xcode projects (it's in a completely unrelated directory). It is included in the list of repositories when I look at Preferences->Accounts. Nothing I could do would convince Xcode to ignore the repository (tried deleting the reposity from the account list, but it would just come back next time I restarted Xcode). Tried disabling the repo. No effect. Still rows of ?s on my source code.But then I tried removing the other repository (as in: removing the directory containing it - not via Xcode). I then fired up Xcode. This time it popped up a dialog at the beginning, saying:This workspace includes files from other working copies that are not checked out. Choose Check Out to select additional working copies. Choose Ignore to skip these working copies.If I then say Ignore - voila.. the problem is fixed!When I get a chance I'll experiment to see whether I c
Jun ’15
Reply to Is anyone able to build the Lister sample project?
Hey TungstenT.I got it to run after the same steps you took. I had to change the iCloud Document Storage to App Groups also. (This is probably not related to your issue)Possibly obvious question, did you try a 'Clean'?My issue is getting the UI tests to run as they did in the WWDC15 videos :-( ('Cookies' keep getting adding to the list as 'can')Cheers,Mark
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Backup failed in ios9 and cannot delete backup
I put IOS9 beta 1 on an IPhone 5 A1428 and Saturday night the backup failed.There was 2 backups listed for the same device; I was able to delete the 0kb backup but now I have a invisible 2.4gig backup that I cannot seem to delete (or see in the usage).I don't see the backups I cannot delete in Yosemite but I cannot delete them there either?Suggestions?
2
0
435
Jun ’15
Reply to Not launching
Seems to happen pretty often to me. Just happened now, I cleaned, rebuilt, uninstalled on watch and phone, reinstalled, rebooted the device, and finally, I managed to get it running by opening the Apple Watch app on my phone, going to the my app listed there and toggling Show app on apple watch off until it war removed. Then I toggled it back on, and after it reinstalled, it worked.I have yet to find a definitive way to get it working again when this happens to me, but I will let you know if I do. Just keep keep tinkering with it like I did above and you should be able to get it working (assuming it works in the simulator).EDIT: Just happened again to me. Toggling that option in the Apple Watch app didn't work this time. So I toggled it off, rebooted watch, toggled it back on and it worked.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Changing paid app to freemium (existing users)
I'm considering changing my app Look Up from paid to using an in-app-purchase to unlock all the features.I was wondering if anyone has used the method listed here on StackOverflow of using the appStoreReceiptURL to verify if a user had purchased the app in the past, and using that to unlock all in-app-purchases.I don't want to do the method listed below that recommends releasing a new app and pricing the current app very expensive, in order to be able to still release updates. Seems like an irresponsible way to do things.Any suggestions on how to handle the transition are much appreciated!
6
0
2.9k
Jun ’15
Reply to Swift nested for loops cause performance hit
If you are trying to run the equvalent of 10 million operations per second, every second, then you're at risk of failing to meet your frame rate requirement, no matter what language you use. In that case, the choice of language (at least for that part of your code) is critical, and chances are you wouldn't use Sprite Kit at all. However, the more rational choice is to avoid running 10 million operations per second. (If nothing else, that sort of thing will kill battery life.)The numerical problem with your original analysis (I claim) is that you were assuming your app was otherwise idle, but you were sharing time with Sprite Kit. In fact, if you wrote the double loop as a simple test app in C++, it would be otherwise idle, because by definition you wouldn't be sharing time with Sprite Kit itself. If you want to microbenchmark and empty Swift loop vs. an empty C++ loop, you need to actually measure the elapsed time for the loop alone, not the frame rate. You'd also need to make sure the C++ compiler didn't opt
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Strong Reference Cycle in Recursive Closures
It is a very common technique to create generic recursive closures in swift, like that demonstrated in WWDC2014 Advanced Swift Session.But somehow I find it is very possibile to create a Strong Reference Cycle with it.Here is the simple code. I used the foo function scope to simulate life cycle, beyond which all objects are supposed to dealloc.class Nested { func print() { println(Print Nested) } deinit { println(Nested dealloc) } } typealias ClosureType = Int -> Int func foo() { var myClosure : ClosureType = { value in value } func setClosure() { var date = Nested() myClosure = { input in date.print() return input <= 1 ? 1 : input + myClosure(input - 1) } } // do something setClosure() println(myClosure(5)) } // test it foo()the output didn't include the deinit stringI think it is because myClosure is capturing itself. It is not a very big memory leak until some extra objects are involved (like that Nested object which may contain very large amount of objects).The problem is when I no longer need that
9
0
2.6k
Jun ’15
Reply to Strong Reference Cycle in Recursive Closures
Thanks, this will work, but this approach will still not solve return the closure and clear it problem.If you want to return the closure and attempt to clear it afterward, you have to use a mid-layer wrapper, which is the same as you wrote shove all of this inside an object and manually clear it via the wrapper.However just as I said in the first post. I think it is somehow not elegant.One last thing I'd like to discuss is that although func foo() is defined globally, the calling context may not be global. For example, there is an object of a certain class which needs a function to do some calculation, in the lifetime of this object, it may generate a closure using foo(), returned along with the closure is some additional data just like Nested; when this object is dead, it no longer needs this closure and that addition data. There should be a more elegant way to perform this task without having to involve a mid-layer wrapper.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to Exhaustive catch inference
I’m not a compiler expert, but for statically dispatched functions/methods (and possibly dynamically dispatched internal methods), I imagine the compiler should be able to determine an unambiguous list of error types generated by all throw & try statements within the function body, and associate this as hidden type information. Similar to the explicit error type annotations that everyone seems to be foolishly requesting, but automatically generated by the compiler.There are a number of scenarios the compiler wouldn’t be able to infer (which is what I thought was meant by the compiler attempts to infer) such as public non-final object methods, function parameters on public functions/methods, and public protocols - in this case you would still require the `catch {}`I’m starting to think if this was ever part of the plan, the increased emphasis on protocols/protocol extensions killed it. There’s definitely a big gap left in terms of how possible error types get communicated to consumers.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15