Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to Inspect Bridged Signatures
Select the obj-C header you want to view in the editor in Xcode (the individual header files tend to work better, rather than the bridging header), and then click the little button at the top left of the editor section which looks like four little squares (or go to menu and use View > Show Related Items). Choose Generated Interface at the bottom of the list that pops up, and it will show you the Swift version of the objective C header.You can also type the name of an obj-C class into a Swift file, and command-double-click to open up the generated swift header that contains the declaration that class (or method).
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
xcode crashing when submitting to app store
Xcode started crashing when I submitt the app to the app store. Starts uploading and then crashes;-Any help would be great Thanks 🙂Process: Xcode [901]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 [901]User ID: 501Date/Time: 2015-06-18 11:56:49.680 +0100OS Version: Mac OS X 10.10.3 (14D136)Report Version: 11Anonymous UUID: 94F7BB97-75BE-AD36-EAE9-7A9A74443C6FTime Awake Since Boot: 1200 secondsCrashed Thread: 31 Dispatch queue: NSOperationQueue 0x7ffcdc1cbd70 :: NSOperation 0x7ffcdc1ab340 (QOS: USER_INITIATED)Exception Type: EXC_CRASH (SIGABRT)Exception Codes: 0x0000000000000000, 0x0000000000000000Application Specific Information:ProductBuildVersion: 6D2105ASSERTION FAILURE in /SourceCache/IDEFrameworks/IDEFrameworks-7718/IDEFoundation/Issues/IDEIssueManager.m:457Details: This method must only be c
3
0
708
Jun ’15
Reply to How to get user-entered data?
It may just be a casualty of trying to copy and paste code into the forums, but it looks like your textFieldShouldReturn() delegate method is trapped inside the scope of your viewDidLoad() method, rather than in the class itself where it should be for it to get called as a method.If you understand any objective-C, the Hello World iOS sample code is old but might help you figure out the right methods to call:https://developer.apple.com/library/prerelease/ios/samplecode/HelloWorld_iPhone/Listings/Classes_MyViewController_m.html
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Recursion over a Sliceable
Hi,I feel that I must be missing something obvious. Decomposing a list into the head and tail and then recursing over the tail is a standard functional programming technique, yet I'm struggling to do this for Sliceble types in Swift.To start with a simple case using an Array, I have a recursive function that follows this pattern:func recurseArray(arr: [Int]) -> [Int] { guard let first = arr.first else { return [] } let rest = recurseArray(Array(dropFirst(arr))) let next = rest.first ?? 0 return [first + next] + rest }(Obviously the real code does a lot more than add each number to the next).Note the call to `Array(dropFirst(seq))`. Converting to an Array is required since dropFirst actually returns an `ArraySlice`, and an `ArraySlice` isn't `Sliceable`, so I can't pass it to my function.I'm not sure what sort of optimisation the compiler is capable of here, but it seems to me that creating a new array from a slice unnecessarily won't be optimal. Is there a solution to this?Furthermore, what I'd *r
4
0
1.2k
Jun ’15
Reply to Recursion over a Sliceable
You can manage it with these generic requirements:< S : Sliceable where S.SubSlice : Sliceable, S.SubSlice.Generator.Element == S.Generator.Element, S.SubSlice.SubSlice == S.SubSlice >For instance, this sums a sliceable Collection:func recSum< S : Sliceable where S.SubSlice : Sliceable, S.SubSlice.Generator.Element == Int, S.SubSlice.SubSlice == S.SubSlice, S.Generator.Element == Int >(list: S) -> Int { return list.first.map { $0 + recSum(dropFirst(list)) } ?? 0 } recSum([1, 2, 3]) // 6And if you wanted a more generic example, here's a kind of reduce1 with recursion:func recReduce< T, S : Sliceable where S.SubSlice : Sliceable, S.Generator.Element == T, S.SubSlice.Generator.Element == T, S.SubSlice.SubSlice == S.SubSlice >(list: S, combine: (T, T) -> T ) -> T? { return list.first.map { head in recReduce(dropFirst(list), combine: combine) .map {b in combine(head, b)} ?? head } } recReduce([1, 2, 3], combine: +) // 6Or, as a method:extension Sliceab
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to -[NSHTTPCookieStorageInternal cookies]: unrecognized selector sent to instance 0x...
I inspected the list of publicly available methods in the NSHTTPCookieStorage and cookies is nowhere to be found:dealloc _initWithIdentifier:private: _syncCookiesregisterForPostingNotificationsinitInternalWithCFStorage:what am I missing here? Is it an issue with the NSHTTPCookieManagerCookiesChangedNotification mechanism? Why is it giving an object of type NSHTTPCookieStorageInternal instead of NSHTTPCookieStorage?
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Forum usability
It's a bit awkward to navigate on a 13 MBP. On the opening page, height of the search area + icons exceeds the screen height, so stuff often loads below the fold. Also on that page, it’d be nice to have a list of the latest posts from all sections, saving us from having to check each one.
5
0
390
Jun ’15
Reply to Forum usability
>it would be nice if that view could be shown for an individual forum.In some cases, you can hover over a forum title link and that will pop up a recent's list in a blurb.Example: Use the Content link, then look at the first post listed and note something like In Xcode/Swift...Swift is highlighted to indicate a link...hover your mouse cursor over that link and see what happens.This doesn't seem to be a universal feature, tho, so best to practice by poking around to see where it does help.◅▻
Jun ’15
Xcode Organizer Crash Submitting to Store
Hi,Been trying to submit to iTunes Connect, everything was working fine the week of the WWDC 2015. Tried to post up our final build this week and the Organizer has started crashing in iTunes Connect component with the Submit to Store button. I have filed a TSR, snippet of stack back trace below.I can work around by using the Application Loader 3.1, but getting new error:Non-public API usage with SockPuppetGizmo The above error had not been thrown prior to yesterday and I have been submitting the same App with a couple of of bug fixes over the last 2 weeks. I can find a reference to a GitHub SockPutterGizmo project and this appears to be watchOS1 / 8.2 SDK private headers that we are not trying to implement.Wondering if anyone else is having trouble trying to submit their 1st Watch App to the store this week and experiencing similar porblems?This crash started occuring on 6/17/15, hopefully fixed in Xcode 6.3.3 or Xcode 6.4 when it goes final.-=-=-=-=12 0x00007fff92ad3c46 _CFXPreferencesReplaceValuesInNamedVol
2
0
637
Jun ’15
Solutions for Better Battery Life on Beta 1 - Confirmed for Mult. Devices
Update: 6/21/2015 - 3:43 AM PST - Added third step that may resolve certain issues stemming from prior iOS backups restoring to iOS 9 Beta 1.OK we've done our 24 hours of testing and can very safely conclude that all battery life issues accross three different devices included in the test have been entirely resolved and now the devices are not heating up, charging normally, and retaining a normal rate of discharge on standby. In additio, battery use reports within Settings confirm that the Homescreen no longer is consuming a substantial (more than 20%) portion of the average use of total battery power. (devices are normalizing data still, however to ensure none of you suffer this any further here are the necessary changes)1. Completely disable iCloud Backups on each device running iOS 9 Beta 1 (Use iTunes to Backup and restore devices for now.)2. Disable iCloud drive (if you enabled it) on each device running Beta 13. If you restored a backup from iOS 8.4, 8.3 or earlier after upgrading to 9.0 Beta 1 then you
33
0
7.7k
Jun ’15
Reply to this core storage operation is not allowed on a sparse logical volume group
Long story short, you're going to have to wipe your HD and reinstall.Long story long, run a backup (Time Machine is fine), then boot into Recovery Mode. From there, you'll have to do some command line work, so if you're not comfortable doing that, your best bet is to either wait till Apple provides a solution or hold off on installing the beta. If you're OK with working through the command line, from the Utilities menu, choose Terminal and enter:diskutil coreStorage listand see what returns. My drive had 5 or 6 branches to the tree it will display and, I believe, this is where the problem lies. How they got there I'm not sure. Maybe it was a relic from installing Yosemite betas. Either way, they are what was causing the problems for me. I believe the default number of entries (look for the + symbol in the results) to be four listings. I then ran:diskutil coreStorage delete insert base Logical Volume Group name herewhere you will insert whatever the name of the base level Logical Volume Group without
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
xCode Server failed to start automated tests
Hello everyone,We encounter a problem when we try to use xCode Server to perform automated test.The destination of the automated test is the iPad 2 simulator. Also we have enabled code coverage for the corresponding scheme/targets.According to the logs for the Bot, at the end of the Build Log, it shows:xcodebuild[88163:801713] [MT] IDEBuildOperationQueueSetResourceManager: Resetting max operation to 1** TEST FAILED **None of the tests has been performed.From the console, the system log shows the following error:==== system log ===Jun 18 13:55:59: Xcode version: 6.3.2 (6D2105) (OS X SDK 13F34, iOS SDK 12F69) Jun 18 13:55:59: Server version: 4.1 (14S1092) Jun 18 13:55:59]: OS X version: 10.10.3 (14D136) Jun 18 13:56:00: common_reenable_update: UI updates were finally reenabled by application Xcode after 3.30 seconds (server forcibly re-enabled them after 1.00 seconds) Jun 18 13:56:01: inet_set_autoaddr(en1, 1) failed, Resource busy (16) Jun 18 13:57:29: process Xcode[93913] caught causing excessive wak
0
0
470
Jun ’15
Sequel - NSInternalInconsistencyException
I'm trying to perform a segue into another screen works fine in IOS 7/8 but seems to error here any ideas what could be the issue?It's pretty simple... UIAlertAction *actionContinue = [UIAlertAction actionWithTitle:@Continue style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { [self performSegueWithIdentifier:@ContinueActivityPush sender:self]; }];Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not perform segue with identifier 'ContinueActivityPush'. A segue must either have a performHandler or it must override -perform.'
1
0
880
Jun ’15
iOS performs scan request for desired device but no didDiscoverPeripheral callback
I am scanning for a device by its advertised service UUID in the advertisement payload. In both foreground and background, I have observed the mobile device sending a scan request packet, the device sending a scan response packet, but no didDiscoverDevice delegate method is invoked in the application.Has anyone else experienced similar behavior? I would assume that with the initial advertisement and the scan request (that contains device name and some other stuff) the CBPeripheral object would have everything it needs to be created. Can anyone speak to this?
0
0
471
Jun ’15