Most voted "objective-c" questions
This tag should only be used for questions that are about Objective-C language resources or rely on language code. The "Cocoa" and "Cocoa-touch" tag should be used to ask about the Apple framework or classes. Use related [Ios] and [osx] tags for specific issues for these platforms.
Learn more…276 questions
Sort by count of
-
8
votes1
answer1135
viewsHow to get the full CEP using reverseGeocodeLocation on Xcode?
I’m using the reverseGeocodeLocation to search for the zip code and it works well; however, it only brings 5 digits of the zip code. How to get the full zip code? Follow the code: -…
-
8
votes1
answer91
viewsType Int8 on Swift does not store maximum integer 255
Doing some pranks on the Playground, With Swift 2.2 we can declare constant let testeIntOitoBits: Int8 = 127 //maximo - deveria ser 255 let testeIntOitoBits2: UInt8 = 255 Why can’t I store 255 in…
-
7
votes1
answer239
viewsWhat is the Runloop?
I’d like to know what Runloop is in iOS and how it and the corresponding thread interact. It would also be interesting to understand how these two concepts interact with the autorelease pool.…
-
7
votes4
answers379
viewsWhat types of retain Cycles can be generated with ARC?
I know that with ARC there can be Leaks in iOS. What are the most frequent Leaks types and how they can be avoided?
-
7
votes3
answers2732
viewsWhen and how to use protocols and delegates?
Could someone please explain to me in what situation and how to use delegates and protocols, I’m a little confused when to what I’ve read around, Thank you!
-
7
votes3
answers1666
viewsIonic is suitable for what types of applications?
The Ionic Framework is indicated for what types of applications? I’ve been doing some research on the plugins of Cordova, seems to give much problem in cross platform development, some plugins do…
-
6
votes1
answer145
viewsIOS - How to make the app screen always lit?
I’m making an app for IOS I already have ready on Android, I wanted to make a method that left the screen always lit, but I’m not getting On Android I did this way: Mainactivity: PowerManager pm =…
-
5
votes3
answers208
viewsComposition: use @class or #import?
I recently had a problem with Unknow type name 'Class', 'cause I was doing import in the header of 2 classes. I discovered that this is a classic error of headers importing headers. I was directed…
-
5
votes2
answers287
viewsHow to use the Afnetworking 2.0 library synchronously?
I would like to call a Rest service using the library AFNetworking. How to make a call synchronously, ie wait for the return of the webservice? For example: Method that will return a car object:…
-
5
votes1
answer235
viewsWhat is the difference between the + and - signal in Objective-C
I wanted to know the difference in the time of creating a method using the "+" and "-"? And also when to use and why to use, I usually only use the "-", but I don’t know how to use the method with…
-
5
votes1
answer2460
viewsRead bank note barcode
How can I read ITF (size 44) coded barcode in the Intercalated 2 of 5 pattern. Using some library like zxing, zbar, etc.? I have used zxing and zbar libraries, but does not recognize the barcode of…
-
5
votes1
answer811
viewsHow do I implement an Apple APNS push notification service?
I own a web service, and would like to create a Push Notification service for an app using Apple APNS without using the third-party service, as I could do this?
-
5
votes1
answer285
viewsFormatting decimal
I’m having a problem formatting decimals in my code in Objective-c, I would like to take advantage only 2 decimal places of my variable which is float. Ex: Value of the variable discount =…
-
5
votes1
answer168
viewsLoad Webview in Objective c
I set up a Builder interface to load a webview, with . h, . m and .xib. In a side menu, when clicking on an option, I need to call this webview. Running the application, clicking on this option…
-
5
votes1
answer439
viewsDo I need a macOS computer to program Swift 4 and Objc?
I’m doing a lot of research on iOS app programming, and all the online courses I find on the computers are Apple-based. To program Apple, you need an Apple computer?
-
4
votes2
answers272
viewsTesting of asynchronous requests
How can I make asynchronous requests in iOS Testcases? Example: -(void)test { UserModel* user = [UserModel sharedInstance]; [user requestUserInformationWithCompletion:^(NSError* error, NSDictionary*…
-
4
votes1
answer135
viewsLoop does not run on Xcode
I’m trying to run a loop in the Xcode, but it doesn’t work. On the console gets: Type the loop number: 5 Nothing else happens in the terminal. 0,1,2,3,4,5 does not appear. In short, it stands still…
-
4
votes3
answers619
viewsRotation on certain screens
How do I define only one UIViewController be able to rotate? The scenario is as follows: I own 5 screens, and in all of them I must enable only the mode portrait. But I have a sixth screen, and this…
-
4
votes1
answer222
viewsHow to generate a random number within a range?
Using the mercy of arc4random_uniform(), how should I set the logic to generate a Random within a certain range? For example, given the range [5, 10] Candidates for Andom: 5, 6, 7, 8, 9, 10…
-
4
votes1
answer352
viewsHow to access PHP webservice securely from an Objective-C/iOS app?
I’m making an application where I need to securely send user data to the Web Service using PHP. For this, I’m researching security for iOS. What is the recommended method and what are the points I…
ios web-service objective-c security-guard cryptographyasked 9 years, 7 months ago Tiago Amaral 1,520 -
4
votes1
answer50
viewsHow to configure predicate to return only 2 columns?
Setting: Query using Coredata for records with a city and state, and return only the columns 'name' and 'address' of the location. I am currently using the following query: // Array that will be…
-
4
votes1
answer70
viewsUitableview with customized and resizable Uitableviewcell
I’m creating a chat for Ios in Objective C, and I use custom Uitableviewcell. My difficulty is in resizing Cell as the text in the chat, as the image: And this second screen, it’s like this, with…
-
3
votes1
answer375
viewsBlocks vs Functions in Objective-C
What is the difference between blocks and functions in Objective-C?
objective-casked 10 years, 9 months ago tumm 307 -
3
votes2
answers120
viewsUiactivityindicatorview does not work
I want to display the activity after the click of a button. This button will update the app. I followed examples and documentation, but it doesn’t work... - (void)viewDidLoad { // .. snip indicator…
-
3
votes2
answers395
viewsFormat number in Objective-C
I have an app that makes a calculation and returns a float, guy 4/2 = 2.00 but I would like this calculation to show only the 2, and if the result were decimal places with different numbers of 0 it…
objective-casked 10 years, 8 months ago Jadson 31 -
3
votes1
answer331
viewsHow to pass information from the second Viewcontroller to the first Viewcontroller
I’m having trouble passing along information from the second screen of a NavigationViewController to the first screen of NavigationViewController. On some gringo sites I found teaching to do by…
-
3
votes1
answer92
viewsFormat RTF file to be sent as body using Mfmailcomposeviewcontroller
I have to send a report in text (with formatting) that I put in an RTF file within my project. When I set the email body using the method below, the formatting of the RTF file is not recognized by…
-
3
votes4
answers1447
viewsFormat currency in a Uitextfield
I need to create a Uitextfield to add money values. But I need the user to see the value being added to Uitextfield in the order the user type. Example: User type 1 - Uitextfield appears 0.01 User…
-
3
votes3
answers207
viewsCreate Uiview Free
I need to create a new screen (Uiview) translucent in my app, in the style of an Iad iOS 7, but my problem is that I have no idea how to look for it. What I found so far are old things, with many…
-
3
votes3
answers246
viewsTransporting data between Appdelegate and Viewcontroller
My problem is this. I need that when the user starts my App, it comes back with the data that was on the screen before closing it. So my initial idea, is when the app enters Background it records a…
-
3
votes1
answer470
viewsCreate a tableView with 616 items
I have to create a table with 616 items, each item has 5 details. Example: Item 1 - Aspirin Risco: Medio Lactacao: Alto Gravide: Bass item 2 - Dipirona Risco: Medio Lactacao: Alto Gravide: Bass ...…
-
3
votes3
answers661
viewsReceiving value from one method to another - Objective C
I need to receive the value that comes from the settings of the device (That I already got, as it is in the code below) and I need to pass this return to a string that will allow login to my…
objective-casked 10 years, 4 months ago Diego Neri 39 -
3
votes1
answer524
viewsEclipse app for iPhone
I’m in need of some help, and I don’t even know what to do. I created a very simple Eclipse Kepler, I put in Google Play and it was great. I would like to know if it is possible and how best to…
-
3
votes2
answers103
viewsHow to replace a keyboard with a Uipickerview?
I have a program, that an excerpt from the form, in case a UITextField, that needs to be filled in. But instead of a keyboard, I need a UIPickView, that already has the options for filling. Then the…
-
3
votes1
answer190
viewsDevelop for iPhone when you’re an Android developer
I develop for Android, now I want to start developing for iPhone, my doubts are as follows. I use Linux, searching the internet concludes that Apple only provides the tools for Mac. And to program…
-
3
votes1
answer780
viewsHow to integrate Objective-C and Swift?
I am doing a project on Swift and would like to use some files in Objective-C. It is possible to do this? In case I installed using the Cocoa Pods, I don’t know if it influences anything.…
-
3
votes1
answer92
viewsCreating a custimized authorization message
Is there any way to customize the authorization message to requestWhenInUseAuthorization and requestAlwaysAuthorization? I know for this to work we have to add in info.plist the information…
-
3
votes1
answer2497
viewsHow to get the complete ZIP code through the GPS of the mobile phone
I’m trying to get the full zip code through my location using the GPS of my mobile in Objective-C, but it returns only 5 digits. I used the following code snippet: NSString *cepcompleto = [NSString…
-
3
votes1
answer85
viewsRecord video with Avfoundation framework and save to iphone gallery
I’m creating an app for IOS 8 that uses the front camera to record user video until a certain action is called, and finally save in the gallery. But so far I could only do this with photo (takes…
-
3
votes1
answer47
viewsNslocalizedstring does not return matching text
Personal I’m using the function NSLocalizedString in an iOS app but this is not returning the related text I put in a file Localization.strings that has the content below. Someone could help me to…
-
3
votes2
answers79
viewsHow to Create a Slide Side Out Submenu
As I can add a submenu to an existing menu, example I have the menu Ensino inside teaching want to put Cursos,Intercambio and iniciação cientifica, I’m using a class called SWRevealViewController…
-
3
votes1
answer58
viewsHow do I check if a product has already been purchased by the user on iOS?
Guys, when I want to validate if a product of my application (an Inapp) has already been purchased by the user, on Windows Phone I just check the product through Licenceinformation. For example: var…
-
3
votes1
answer71
viewsWhat language corresponds to "Foundation"?
I’ve asked this question before, but it wasn’t clear enough, so I’ll explain again. I am learning Objective-C from a book. However, this book is old, and in it, the author of the book uses version…
-
3
votes2
answers1140
viewsHow to create automatic line break with Uilabel
I’m creating an app for posting Catholic content, but I’m having a problem, I have a UIViewController with a title, an image of the post and below the image the content, depending on whether the…
-
2
votes2
answers237
viewsDisable Return button of`Uitextfield`
Is there any way, no whining, to disable the Return button of a UITextField? I have a screen with two UITextField, a text and a numeric, I need the keyboard to be activated directly and I need the…
-
2
votes3
answers308
viewsUse of `self->` instead of `self. `
I am working on an app that was not I who started the code and I am having problems regarding the use of the command self->. At some point of the code I’m finding variables declared with…
-
2
votes1
answer107
viewsCheck if a device has GPS and Location Service is active
I need to check if the iPad I’m using has GPS and if the app’s location service is active while using the app, how can I get this information?
-
2
votes1
answer64
viewsCustomizing Uiactivityindicatorview
It is possible to swap the widget (source: iab.net.) of a UIActivityIndicatorView by a specific gif? How?…
-
2
votes1
answer140
viewsXcode - Array position value is not displayed
I have an array with 30 positions and at each position of the array I have several objects like: Numprocesso, Nome, Idade, Sexo, Datanascimento. I would like to show all these objects from each…
-
2
votes2
answers46
viewsIs it possible to make a selection list in the form of a loop?
It is possible to make a selection list (UIPickerView) in loop form? Put the month of January right after December, I say.…