Tag: objective-c

62 votes
21 answers
1.9K views
Add bottom border line to UI TextField view in SwiftUI / Swift / Objective-C / Xamarin

I would like to keep the border at the bottom part only in UITextField. But I don't know how we can keep

avatar
Rudy
0 1 0 9
asked 07 September, 2021
60 votes
9 answers
1.6K views
What does the NS prefix mean?

Many classes in Cocoa/Cocoa Touch have the NS prefix. What does it mean?

avatar
Serina
0 1 0 9
asked 07 September, 2021
62 votes
6 answers
497 views
Send and receive messages through NSNotificationCenter in Objective-C?

I am attempting to send and receive messages through NSNotificationCenter in Objective-C. However, I haven&apo

avatar
Tana
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
1K views
How do I test if a string is empty in Objective-C?

How do I test if an NSString is empty in Objective-C?

avatar
Deedee
0 1 0 9
asked 07 September, 2021
54 votes
25 answers
2.4K views
How to link to apps on the app store

I am creating a free version of my iPhone game. I want to have a button inside the free version that takes peo

avatar
Suzan
0 1 0 9
asked 07 September, 2021
53 votes
30 answers
739 views
Placeholder in UITextView

My application uses an UITextView. Now I want the UITextView to have a placeholder similar to the one you can

avatar
Corey
0 1 0 9
asked 07 September, 2021
57 votes
19 answers
2.3K views
How do I create delegates in Objective-C?

I know how delegates work, and I know how I can use them. But how do I create them?

avatar
Forrest
0 1 0 9
asked 07 September, 2021
53 votes
20 answers
728 views
How do you trigger a block after a delay, like -performSelector:withObject:afterDelay:?

Is there a way to call a block with a primitive parameter after a delay, like using performSelector:withObject

avatar
Xavier
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
2.9K views
How to check iOS version?

I want to check if the iOS version of the device is greater than 3.1.3 I tried things like: [[UIDevice curren

avatar
Boyd
0 1 0 9
asked 07 September, 2021
57 votes
14 answers
500 views
How do I convert an NSString value to NSData?

How do I convert an NSString value to NSData?

avatar
Winford
0 1 0 9
asked 07 September, 2021
59 votes
12 answers
544 views
How do I animate constraint changes?

I'm updating an old app with an AdBannerView and when there is no ad, it slides off screen. When there is

avatar
Georgie
0 1 0 9
asked 07 September, 2021
61 votes
14 answers
1.3K views
Constants in Objective-C

I'm developing a Cocoa application, and I'm using constant NSStrings as ways to store key names for

avatar
Wilfredo
0 1 0 9
asked 07 September, 2021
63 votes
23 answers
2.2K views
How do I check if a string contains another string in Objective-C?

How can I check if a string (NSString) contains another smaller string? I was hoping for something like: NSS

avatar
Thurman
0 1 0 9
asked 07 September, 2021
53 votes
19 answers
1.9K views
performSelector may cause a leak because its selector is unknown

I'm getting the following warning by the ARC compiler: "performSelector may cause a leak because its sel

avatar
Tuan
0 1 0 9
asked 07 September, 2021
61 votes
27 answers
1.6K views
How do I sort an NSMutableArray with custom objects in it?

What I want to do seems pretty simple, but I can't find any answers on the web. I have an NSMutableArray

avatar
Stacia
0 1 0 9
asked 07 September, 2021
66 votes
30 answers
624 views
How can I make a UITextField move up when the keyboard is present - on starting to edit?

With the iOS SDK: I have a UIView with UITextFields that bring up a keyboard. I need it to be able to: Allow s

avatar
Dario
0 1 0 9
asked 07 September, 2021
58 votes
27 answers
1.4K views
What's the difference between the atomic and nonatomic attributes?

What do atomic and nonatomic mean in property declarations? @property(nonatomic, retain) UITextField *userNam

avatar
Mikki
0 1 0 9
asked 07 September, 2021
58 votes
30 answers
1.6K views
How to hide UINavigationBar 1px bottom line

I have an app that sometimes needs its navigation bar to blend in with the content. Does anyone know how to

avatar
Corey
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
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