Tag: c

56 votes
30 answers
3.1K views
How would I create a UIAlertView in Swift?

I have been working to create a UIAlertView in Swift, but for some reason I can't get the statement right

avatar
Nidia
0 1 0 9
asked 07 September, 2021
59 votes
23 answers
3.1K views
What does an exclamation mark mean in the Swift language?

The Swift Programming Language guide has the following example: class Person { let name: String init

avatar
Keila
0 1 0 9
asked 07 September, 2021
55 votes
6 answers
1.3K views
Why are emoji characters like ?‍?‍?‍? treated so strangely in Swift strings?

The character ?‍?‍?‍? (family with two women, one girl, and one boy) is encoded as such: U+1F469 WOMAN,

avatar
Joseph
0 1 0 9
asked 07 September, 2021
56 votes
30 answers
1K views
UIScrollView Scrollable Content Size Ambiguity

Fellow devs, I am having trouble with AutoLayout in Interface Builder (Xcode 5 / iOS 7). It's very basic

avatar
Stacia
0 1 0 9
asked 07 September, 2021
56 votes
26 answers
2.8K views
dispatch_after - GCD in Swift?

I've gone through the iBook from Apple, and couldn't find any definition of it: Can someone explain

avatar
Emilia
0 1 0 9
asked 07 September, 2021
53 votes
7 answers
1.9K views
How can I make a weak protocol reference in 'pure' Swift (without @objc)

weak references don't seem to work in Swift unless a protocol is declared as @objc, which I don't wa

avatar
Venice
0 1 0 9
asked 07 September, 2021
53 votes
30 answers
1.8K views
Using a dispatch_once singleton model in Swift

I'm trying to work out an appropriate singleton model for usage in Swift. So far, I've been able to

avatar
Clarice
0 1 0 9
asked 07 September, 2021
63 votes
23 answers
437 views
Convert Int to String in Swift

I'm trying to work out how to cast an Int into a String in Swift. I figure out a workaround, using NSNum

avatar
Deedee
0 1 0 9
asked 07 September, 2021
62 votes
22 answers
2.2K views
UITextField text change event

How can I detect any text changes in a textField? The delegate method shouldChangeCharactersInRange works for

avatar
Freida
0 1 0 9
asked 07 September, 2021
56 votes
30 answers
1.3K views
iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta

This crash has been a blocking issue I used the following steps to reproduce the issue: Create a Cocoa Touch

avatar
Solomon
0 1 0 9
asked 07 September, 2021
58 votes
19 answers
1.4K views
Do Swift-based applications work on OS X 10.9/iOS 7 and lower?

Will Swift-based applications work on OS X 10.9 (Mavericks)/iOS 7 and lower? For example, I have a machine ru

avatar
Keith
0 1 0 9
asked 07 September, 2021
61 votes
17 answers
438 views
How do I see which version of Swift I'm using?

I just created a new Swift project within Xcode. I am wondering which version of Swift it's using. How

avatar
Margo
0 1 0 9
asked 07 September, 2021
52 votes
30 answers
2.8K views
iOS 8 UITableView separator inset 0 not working

I have an app where the UITableView's separator inset is set to custom values - Right 0, Left 0. This wor

avatar
Trudy
0 1 0 9
asked 07 September, 2021
55 votes
23 answers
2.9K views
@selector() in Swift?

I'm trying to create an NSTimer in Swift but I'm having some trouble. NSTimer(timeInterval: 1, targ

avatar
Majorie
0 1 0 9
asked 07 September, 2021
51 votes
17 answers
2.3K views
#ifdef replacement in the Swift language

In C/C++/Objective C you can define a macro using compiler preprocessors. Moreover, you can include/exclude so

avatar
Rufus
0 1 0 9
asked 07 September, 2021
51 votes
9 answers
2.7K views
Swift Beta performance: sorting arrays

I was implementing an algorithm in Swift Beta and noticed that the performance was very poor. After digging de

avatar
Basil
0 1 0 9
asked 07 September, 2021
55 votes
20 answers
1.8K views
#pragma mark in Swift?

In Objective C, I can use #pragma mark to mark sections of my code in the symbol navigator. Since this is a C

avatar
Don
0 1 0 9
asked 07 September, 2021
58 votes
17 answers
778 views
How do I call Objective-C code from Swift?

In Swift, how does one call Objective-C code? Apple mentioned that they could co-exist in one application, bu

avatar
Dorinda
0 1 0 9
asked 07 September, 2021
52 votes
30 answers
714 views
Passing data between view controllers

I'm new to iOS and Objective-C and the whole MVC paradigm and I'm stuck with the following: I have a

avatar
Vi
0 1 0 9
asked 07 September, 2021
43 votes
12 answers
1.6K views
Why does "npm install" rewrite package-lock.json?

I just recently upgraded to npm@5. I now have a package-lock.json file with everything from package.json. I

avatar
Arline
0 1 0 9
asked 07 September, 2021