Tag: object

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
616 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
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
58 votes
17 answers
774 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
710 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
57 votes
30 answers
2K views
Detecting an undefined object property

What's the best way of checking if an object property in JavaScript is undefined?

avatar
Mikki
0 1 0 9
asked 07 September, 2021
50 votes
30 answers
1.9K views
How can I check if an object is an array?

I'm trying to write a function that either accepts a list of strings, or a single string. If it's a

avatar
Trudy
0 1 0 9
asked 07 September, 2021
53 votes
30 answers
1.5K views
How do I correctly clone a JavaScript object?

I have an object x. I'd like to copy it as object y, such that changes to y do not modify x. I realized t

avatar
Hallie
0 1 0 9
asked 07 September, 2021
59 votes
25 answers
3K views
Checking if a key exists in a JavaScript object?

How do I check if a particular key exists in a JavaScript object or array? If a key doesn't exist, and I

avatar
Yolando
0 1 0 9
asked 07 September, 2021
65 votes
30 answers
1.1K views
How do I test for an empty JavaScript object?

After an AJAX request, sometimes my application may return an empty object, like: var a = {}; How can I che

avatar
Nereida
0 1 0 9
asked 07 September, 2021
48 votes
30 answers
1.9K views
How do I check if an array includes a value in JavaScript?

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the onl

avatar
Omar
0 1 0 9
asked 07 September, 2021
60 votes
30 answers
1.8K views