Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Sorting by distance?
I'm trying to put together an app that sorts some records by their location field. Specifically it should sort from closest to furthest from the user's location.I found a reference to the sortdescriptor named CKLocationSortDescriptor, and here's the text fro the class description:---During sorting, the sort descriptor computes the distance between the value in the relativeLocation parameter and the location value found in the specified key of each record. It then sorts the records in ascending order using the distance between the two points. You cannot change the sort order.---Sounds exactly like what I need, but I can't seem to get it to work. I created a relativeLocation object as a fixed latitude/longitude position. Then I set up the predicate as true, and then used this code for the query: let query = CKQuery(recordType: Trade, predicate: predicate) query.sortDescriptors = [CKLocationSortDescriptor(key: Location, relativeLocation: fixedLocation)] // Create the query operation let queryOperation = CKQueryO
2
0
1.7k
Jun ’15
canOpenURL opt in
While I can understand companies like Twitter abusing the privacy of a user with canOpenURL, this change negatively impacts applications that want to opt into a system where app detection is a heavily-relied on feature. This is especially the case for enterprise apps that utilize a common library to do secure inter-app communication. Because this list of apps keeps growing, it's unfeasible to have every app using such a library to maintain the list of every other app's schemes.I've posted a bug report on this but there hasn't been any feedback. I'm hoping this forum post could provide more visibility. I have a suggestion on a solution that doesn't compromise the privacy enhancement that comes with this change and yet would allow for app discovery:Lets say you have apps A and B. Here is the relevant portion of their Info.plist:App A:<key>CFBundleURLTypes</key><array> <dict> <key>CFBundleURLName</key> <string>CompanyASchemes</string> <key>C
0
0
2.3k
Jun ’15
Reply to where is el capitan beta 2?
If you look hard enough, there are a few sites already listing the URL to download the update as a .pkg file direct from Apple's CDN. I'm not going to post the link though, you'll have to find it yourself. You might want to get the Recovery partition update too if you decide to go ahead with the pkg rather than App Store
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Can't update to WatchOS Beta 2
Hi,I updated my iPhone to iOS 9 beta 2. I have installed the profile for Apple Watch on iPhone & also registered Watch's UDID on Developer site.However, when I go to my Watch app on iPhone and try to perform Software update, it doesnt show.It says watchOS 1.01.. Your software is up to date.Am I doing something wrong?Thanks for your help,Parashar
3
0
1.2k
Jun ’15
Reply to where is el capitan beta 2?
It wasn't showing for me either. Checking in System Preferences -> App Store, nothing was listed about pre-release seeds.To fix it I had to set my update catalog manual using:sudo softwareupdate --set-catalog <URL>I won't link to the catalog url, but it isn't difficult to find.After changing my update catalog, The App Store preference pane now shows that I am set to recieve pre-release update seeds, and the app store found Beta 2 without issue.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to Covariant and contravariant generic type parameters
Let me try to explain.Covariance and contravariance aren't about whether you can store a Dog instance in an Array<Animal> (given that Dog is a subclass of Animal). Like you said, that should work just fine.Imagine you have a generic class, Foo<T>. We know that Dog is a subclass of Animal, so you can use a Dog anywhere you can use an Animal. The question is, can you use a Foo<Dog> anywhere you can use a Foo<Animal>? The answer is, it depends.If Foo is covariant, the answer is yes. If Dog is a subclass of Animal, then Foo<Dog> should be considered a subclass of Foo<Animal>.If Foo is contravariant, the answer is no, and it's the opposite: a Foo<Animal> should be considered a subclass of Foo<Dog>.If Foo is invariant, the answer is no, and Foo<Animal> and Foo<Dog> have no subclass/superclass relation to each other.Which case is true depends on what you want Foo to do, and is something the creator of the class decides. For example, if Foo is a class repres
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Trouble getting Photos editing extension up and running
I decided to start experimenting with the new Photos editing extension stuff that's now in Xcode 7 beta 2, but have been having trouble getting even a basic extension to load properly in Photos. I started out by creating a new project, then adding a new target using the Photo Editing Extension template. I read the part in the release notes about the template still having iOS class names (e.g. UIViewController), so I replaced that stuff and was able to get the extension to compile just fine. The extension does get listed in Photos (and the Extensions pane in System Preferences), but I run into trouble when trying to actually load the extension from within Photos.Initially, I would get an exception thrown somewhere in the exension internals, with a stack trace looking like this:Application Specific Information: Crashing on exception: *** setObjectForKey: object cannot be nil (key: <__NSConcreteUUID 0x7fc7b20210d0> 6B0D50C3-FB4F-4AB5-B90D-022ADE140FAF) Application Specific Backtrace 1: 0 CoreFound
8
0
1.5k
Jun ’15
performSegueWithIdentifier
Hi,I have a crash in my app when try to do a performSegueWithIdentifier in iOS 9, somebody know if it is a bug or if I need to change code, this is my code, that works pretty well in iOS 8.+- (void) do_segue: (NSString*) segue_name{ BOOL is_picker_open = [self get_global_bool_data:@is_picker_open]; BOOL doing_segue = [self get_global_bool_data:@doing_segue]; if(doing_segue) { Log(@Error doing segue because doing segue before...); return; } if(is_picker_open) { Log(@Error doing segue because picker is open...); return; } [self doing_segue_to:segue_name]; if(loading_segue == NO || [self.title is_equal_to_string:@xxxx]){ loading_segue = YES; [[volume_scanner sharedManager:nil] disable_for_one_second]; execute_main_thread(^{ begin_ignoring_events(); @try { [self performSegueWithIdentifier:segue_name sender:self]; } @catch (NSException *exception) { loading_segue = NO; Log(@segue exception catched: [%@] on class %@,exception, NSStringFromClass([self class])); } }); check_point(string_with_format(@Segue to '%@' fro
2
0
5.3k
Jun ’15
Reply to Big Gmail account freezes Mail os10.11
I saw a similar issue to this on beta 1 and reported a bug on it. Specifically I was able to setup my large GMAIL account and it pulled mail in but then stuck on Checking For Mail. This continued and if you looked at the activity window it would look like it was running an inventory on the GMAIL message list (number of total messages) and start to download but never completed even when left for over 24 hours. I still have the same issue on my beta 1 machine for El Capitan now but will be trying this in beta 2 shortly.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to OSX Captain crashed
Hi Max,I am thinking in a possible solution. I have created a lot of different passwords from time to time. Usualy I create very big passwords. The one that forgot its probably around 40 characters, including uppercase, lowecase, numbers and special chars. I am creating a list of the probable passwords with this combination. I think the entire list is going to be bigger than 100 lines.So I would like to try this passwords programaticly to try to unlock my external drive.Would you have any tip on how to make this? Thanks,
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to OSX Captain crashed
I would try the Automator app (don't know if you've used it before, but it comes with OS X). You can build up a sequence of automated actions by using the record button. You may have to learn a couple of Applescript basics too. They're both about as accessible to beginners as these things get, but you'll still have to put in some study to get to automate properly - to be honest, even if your list is 200 passwords or more, you'd probably be quicker doing it manually - but learning new skills is a reward in itself, so I don't want to discourage you.Good Luck!
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to Users charged even though we get an error back
There are some complications which I've observed when the removeTransactionObserver call is used. First, lets review what the StoreKit guide says about the observersThe transaction queue plays a central role in letting your app communicate with the App Store through the Store Kit framework. You add work to the queue that the App Store needs to act on, such as a payment request that needs to be processed. When the transaction’s state changes—for example, when a payment request succeeds—Store Kit calls the app’s transaction queue observer. Using an observer this way means your app doesn’t constantly poll the status of its active transactions. In addition to using the transaction queue for payment requests, your app also uses the transaction queue to download Apple-hosted content and to find out that subscriptions have been renewed.Register a transaction queue observer when your app is launched, as shown in Listing 4-1. Make sure that the observer is ready to handle a transaction at any time, not just a
Topic: App & System Services SubTopic: StoreKit Tags:
Jun ’15