Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to prepareForSegue vs. pushViewController
It's closer, but it should be called dataHasChanged or something similar, not reloadTableView. The fact that it's currently displayed in a table view should be an implementation detail known only to the detail VC. The message you send should have a higher level meaning. Picture the case where you decide to display it in a collection view, a page view controller or some other UI widget. Your source VC shouldn't have to care.Anyway I apologize that I seem to have missed the real problem with your prepareForSegue. You shouldn't instantiate the VC from the storyboard. That is already done for you by UIKit when the segue is performed. You just access the destination view controller of the segue via the segue.destinationViewController property. So it would be something along the lines of let feedVC = segue.destinationViewController as FeedViewController. Maybe some ? in there... I don't do Swift yet. 🙂
Jun ’15
Reply to How do I get a list of all possible values of a Swift enum?
I think you will still have to do it by manually creating a list of all possible values of your enum.Perhaps it might seem strange that an enum is not enumerable ... But apart from that I don't think it is particularly surprising.Maybe you could have a look at the new OptionSetType:https://developer.apple.com/library/prerelease/mac/documentation/Swift/Reference/Swift_OptionSetType_Protocol/index.html
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Best practice for setting CFBundleVersion automatically
With the newest releases of iOS and iTunesConnect, Apple is more and more restrictive about what´s happening in your CFBundleVersion of your Extensions.I tried to fiddle around with Run Script Build Phases, such as this:#!/bin/sh INFOPLIST_EXT=${TARGET_BUILD_DIR}/${INFOPLIST_PATH} echo Extension writing to $INFOPLIST_EXT PLISTCMD=Set :CFBundleVersion $(git rev-list --all|wc -l) echo -n $INFOPLIST_EXT | xargs -0 /usr/libexec/PlistBuddy -c $PLISTCMDHowever, this seems to work for some types of Extensions (WatchKit), but for some others it doesn´t (Today Widget). In my cases, I seem to access the $TARGET_BUILD_DIR before there´s content in it. Using $BUILT_PRODUCTS_DIR delivers the same error.Extension writing to /Users/marc/Library/Developer/Xcode/DerivedData/MyApp-focpnqzzpnqsfyaqwwocwpujmhmh/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/TopNewsWidget.appex/Info.plist Set: Entry, :CFBundleVersion, Does Not Exist File Doesn't Exist, Will Create: /Users/m
6
0
7.2k
Jun ’15
Custom property list type
I am trying to create custom plist definition file. What I did:Create predefined PlistEdit ProMoved saved file to ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/And nothing happened. I am seeing that I can switch to some example types(see on image) in Plist Editor. But how add custom type definition?http://i.stack.imgur.com/eyB9R.pngAs you can see at image exists some example structures.The question is how to create or register custom type to Xcode or Property list editor?
1
0
527
Jun ’15
Mail using wrong address after update
My email address is a mac.com address which is also my AppleID. After upgrading to 10.11 new email created in Mail.app use the me.com variation of my address! When I look in the iCloud preferences, icloud.com, my iPhone, Yosemite macs and the apple ID management site my email address ends mac.com but not on 10.11.When I look at the Account Info/Summary from Mail my email address is listed as me.com Where is this coming from?I've tried deleting all of the mail caches and preferences etc from ~/Library and restarting Mail but it still has the wrong email address. I've never used the me.com cariant of the address. The bizzare thing about this is that me.com is superceded by icloud.com so I could sort of understand if there was some glitch that was never tested with the really old me.com addresses and replaced them with icloud.com but going to the intermediate me.com variant?I should point out that the result of this is that it is impossible to send an email from the updated Mac using my mac.com address
3
0
412
Jun ’15
Reply to Using a cell in another file in Swift
I found the problem: Xcode forgot to add the new TodayCell file to the list of compile sources when I added it to the project. Once I manually did it everything worked fine - I had a funny horror trip in a list of errors in the MKStoreManager library, but all of them went away upon returning to the last commit.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Distribution certificate problem
Dear Developers,I got a following problem :When I try to submit new build version to app store for testing I got this message from Xcode : Your account already has a valid iOS distribution certificate, but it's not installed locally.But actually it is, it displays in Keychain access caertificates list. Xcode doesn't allow me to import any profile files and something like this. I' ve tried all standart solutions: revoked certificates, provisioning files reinstalled it and all this. How to fix it? thanks for your time and help in regard.
9
0
972
Jun ’15
SIMD Vector Operations in Swift 2
Hi, my first post here.In the video What's new in Swift at https://developer.apple.com/videos/wwdc/2015/?id=106, one of the points listed on the slide of new features (but not discussed) was SIMD vector operations.I looked in the pre-release The Swift Language iBook and couldn't find mention of SIMD, and anything concerning Vectors appeared to be to do with Advanced Operators (as in the previous versions of The Swift Language). Does anyone have any information about what was meant? Is the Accelerate framework being made obsolete? Will we even have to worry about this, or is it an internal compiler optimisation?Thanks,Geordie
5
0
6.3k
Jun ’15
Reply to Problems with Mail.app
I'm seeing another issue as well, maybe related to the changes of the list control which add delete/mark gestures:Viewing of Headers and Source are disabled, either by hotkey or by menu choice.I am logging these in Bug Reporter.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Deploying Apps to VPP store
HiWe are struggling to find resources on how to make our app available in the VPP education store. To clarify- this isn't about how to install is on devices, (which there is no shortage of information on), this is specifically about getting our app listed on the VPP for education store so schools can then download and sitribute it to their iPads.Can anyone point me in the direction of a guide for this? Deploying to the regular app store was easy- for some reason this seems to be a little-known secret.Thanks in advance- any help really appreciated as we've been getting our heads around this for a while now.
2
0
489
Jun ’15
Reply to Questions about NSCalendar
I'm getting a bit futher.let dayHourMinuteSecond = NSDateComponentsFormatter() dayHourMinuteSecond.allowedUnits = [.Day, .Hour, .Minute, .Second]Now conforms to the new way Swift 2.0 wants things formatted.I'm trying to figure out the calculated calendar time difference between two dates. Pretty simple. I think the function is the following: (using the autofill template),let userCalendar = NSCalendar.currentCalendar() let difference = userCalendar.components( <#T##unitFlags: NSCalendarUnit##NSCalendarUnit#>, fromDate: <#T##NSDate#>, toDate: <#T##NSDate#>, options: <#T##NSCalendarOptions#>)So my code with my variables would read (with the components used from the formatter above (which the compiler is happy with)let difference = userCalendar.components( dayHourMinuteSecond, fromDate: goHomeYoureDrunkTime, toDate: badPoetryDay, options: NSCalendarOptions)But I can't find any value that satisfies the Options for this. In my other code, WrapComponents was the only value that worked, even t
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
C function pointer - capturing context?
In my Reachability class I'm trying to call SCNetworkReachabilityContext and set a pointer to self as info: var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) context.info = UnsafeMutablePointer<Void>(self)Cannot find an initializer for type 'UnsafeMutablePointer<Void>' that accepts an argument list of type '(Reachability)'How do I achieve this?
2
0
271
Jun ’15
Is anyone able to build the Lister sample project?
So I downloaded the latest Lister sample code for Xcode 7.0b1. I set up the bundle identifier prefix, the development team, and the provisioning profiles as specified in the PDF that came with the sample code. I then tried to build it, but got the following error:---Failed to code sign ListerKit (watchOS).No valid signing identities (i.e. certificate and private key pair) matching the team ID “A93A5CM278” were found.Xcode can attempt to fix this issue.---I don't recognize that team ID, so I'm guessing it's one of Apple's internal accounts. I'd like to change it, except that the General tab, where the setting is normally changed, is not present when I choose the ListerKit (watchOS) framework in the project's target list. It is present on the OS X and iOS framework targets.Is anyone outside of Apple able to build this sample code? If so, then what did you do to get the watchOS framework to build?
6
0
1.2k
Jun ’15