Click here to Skip to main content
15,886,137 members
Everything / Programming Languages / Objective C

Objective C

Objective-C

Great Reads

by Paul M Watt
Guide to understanding how to create and use regions with the WIN32 SDK
by The Ænema
This article will teach you how to create an amazing, clean and smooth WPF/Winform UI for your native application without using any complex, unsafe, ActiveXish methods, etc.
by Jecho Jekov
Provides an easy way to use C calling convention callback functions in C# and VB
by Shmuel Zang
This article shows how we can implement a thread-safe events (similar to .NET events) mechanism using the standard C++ library.

Latest Articles

by Javad Taheri (drjackool)
Show or hide, reorder, save and restore list view column headers
by optiklab1
I demonstrate with an actual implementation that well-known algorithms BFS, DFS, Dijkstra, and A-Star are essentially variations of the same algorithm.
by ToughDev
How to convert between NSString and C strings in iOS project
by Ben McNamara
Container classes much faster than STL.

All Articles

Sort by Title

Objective C 

10 Aug 2015 by Member 11898126
Hello everyone!! I am an iOS client and trying to connect to the remote server with my self signed certificate. I add it to the keychain and start socket connection. When I try my code with localhost, I see some encrypted messages, but when I try to connect to the remote server I get the error...
5 Oct 2014 by KarstenK
Some toughts whether to prefer Objective-C or Swift.
25 Jun 2013 by SanjeevJayaram
While inserting and updating the sqlite database table it works for the first time correctly. while running it for second time error comes as 'database is locked'.what is wrong in it.
14 Sep 2010 by Ohmu
An article that creates a simple iPhone application that displays a graphic then cuts out the .XIB, and completes this just from the code.
28 Oct 2013 by Timir Patel
I want to call .net web-service method from objective c. the web service method contain parameter, so I have to pass parameter also from objective c..
30 Jun 2016 by PT Vyas
I am trying to run an application but not able to build an app, getting following error - /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool failed with exit code 255I have show and follow link to solved error but not solved this error.The link is - Link-1, Link-2, Link-3What I...
30 Jun 2016 by Surya_Narayan
Solution 1 :when testing on device and the only way to resolve it was to physically delete the app from the device (try deleting the app in the simulator) and restarting the simulator.Try cleaning the app. Cmd-Shft-K. Reboot your Mac , Rebuild Your project .. Solution 2 :some...
24 Jan 2005 by darkoman
An article on creating 2D animated charts using Windows GDI.
10 May 2017 by Raghavendra Hosad
2D DFT for Color Image - GUI implementation
8 Oct 2013 by Member 8412410
Hai I am new to ios I check the internet for 3des sample cod but none of the workif any one had know share it
9 Sep 2020 by wooriele
- (float) getVerticalOffset:(CGPoint)point1 point2:(CGPoint)point2 point3:(CGPoint)point3 point4:(CGPoint)point4 magnetLen:(float)length{ float result = length; if (point1.x > point2.x){ float t = point1.x; point1.x = point2.x; point2.x = t; } point1.x -= length;...
2 Jul 2013 by macrose
Please see link below..http://www.cocoabuilder.com/archive/cocoa/108318-converting-objective-to.html#108318Hope it helps.
6 Jan 2012 by larssy1
Hi everyone,Is there anyone who could tell me how i could define global variables which I could start using in my entire application?currently I've tried, However, it is throwing me errors obviously..:http://plaatscode.be/141545/http://plaatscode.be/141543/errors on lines 7,8,9...
6 Jan 2012 by E.F. Nijboer
The first idea that came into mind was a singleton, and surprisingly it is also the preferred method. Check out this link for more info:http://derekneely.com/2009/11/iphone-development-global-variables/[^]Good luck!
31 Jan 2021 by Steffen Ploetz
Creation of a basic icon editor with as little code as possible, that is running on ReactOS and Windows, to check out the stability of application development capabilities on ReactOS
14 Oct 2001 by Joseph M. Newcomer
An improvement on the CBitmapButton class.
21 Feb 2017 by Member 1895422
This article discusses bridging from Fortran to the .NET language C#.
28 Apr 2014 by Andre' Gardiner
A c banking atm concept console application
7 Mar 2016 by Will J Miller
Using UIImagePickerController to replicate the profile selection features found in the contacts app requires solving some vexing problems. This article presents one approach for a class that replicates the functionality using the UIImagePickerController.
27 Aug 2003 by ucc801
A cool GDI pattern brush tool with C++ source code. You can create a new office XP style pattern fill mode quickly.
4 Oct 2004 by liyang yu
A custom TextBox with input validation written in VC++.NET, also walks you through the steps needed to build your own custom controls
4 Jan 2005 by Chris Hills
Other articles describe replacements for MessageBox() with extra buttons for "Yes to All" and "No to All", but you still have to write the code to handle those buttons. This article presents a class that does all the work for you.
16 Dec 2003 by Tibor Blazko, René Greiner
An article about an open source and free fast tree control
9 Oct 2002 by Alex Mol
Classes to make working with time and date data in different timezones easier.
30 Jan 2003 by Marc Richarme
A small class that gives splitter-windows a flat look
9 Apr 2002 by Johnson Zhou
In Visual Studio, you will find an auto-completion list when you type your code in the IDE. This is a similar control but using a tree.
9 Apr 2002 by Paul M Watt
Guide to understand the three different types of clipping regions, and how they relate to the Device Context
31 Dec 2018 by Craig Muller
This article introduces a convenient class for hooking into idle processing.
25 Jun 2002 by Len Holgate
Although socket based TCP/IP servers using IO Completion Ports are often written in C++, it's sometimes useful to write such a server in Visual Basic.
25 Jun 2018 by David Serrano Martínez
A lazy stream has been implemented in C++11, so as to highlight the functional capabilities of this new specification
10 Mar 2002 by Paul A. Howes
An article detailing a simple memory-based device context for the WTL, to be used when flicker-free double-buffered drawing is desired
26 May 2020 by stefan stammberger
A novel allocator implementation for managing huge sets of data in STL's std:: containers for Windows operating systems
23 Jul 2003 by Nitron
A quick reference to pointers and pointer operations
30 Sep 2000 by Sherwood Hu
13 Aug 2010 by Ohmu
A step-by-step Guide to getting a pure code application template.
17 Aug 2002 by Len Holgate
Writing a high performance server that runs on Windows NT and uses sockets to communicate with the outside world isn't that hard once you dig through the API references. What's more, most of the code is common between all of the servers that you're likely to want to write.
27 Mar 2004 by Rob Manderson
12 Dec 1999 by Richard Stringer
A class that simplifies common date handling tasks
5 Aug 2003 by BadJerry
Drawing HTML text onto a device context
19 Aug 2003 by Rama Krishna Vavilala
A utility that can be used to spy the properties of any Windows forms control in the system
23 Sep 2004 by liyang yu
A simple GUI written in MC++ providing a DOM tree and XPath navigator for XML files
9 Oct 2019 by Zebedee Mason
Visual C++ tests are created from Gherkin DSL feature files using a Python 2.7 script
6 Aug 2002 by Alexander Kuzmin
A static splitter with the ability to hide/show multiple columns/rows
1 Dec 1999 by David Lantsman
A tree control / list control hybrid
25 Jun 2016 by Will J Miller
This article describes the implementation of a custom class called MMSCropImageView. The class gives the feature of drawing and moving a rectangle over an image to identify the crop region and return it in an UIImage. It explains the considerations and solutions for cropping a bitmap.
6 Dec 2013 by Mohamed Najim
What is the difference between c and objective c....?????Is the both are same?
6 Dec 2013 by OriginalGriff
No.As a quick google would have told you: difference between c and objective c[^] Objective C is a superset of C.
7 Dec 2013 by baliram bhande
Objective-C is a thin layer on top of C, and moreover is a strict superset of C; it is possible to compile any C program with an Objective-C compiler, and to freely include C code within an Objective-C class.Objective-C derives its object syntax from Smalltalk. All of the syntax for...
1 Jan 2011 by Sagarkadam
How and where to declare a global variable a objective c..?
1 Jan 2011 by Sandeep Mewara
I am not sure of whats unclear, so have a read here[^]. You should be able to define global variables after reading it.
22 May 2012 by Sathish Kumar Namachivayam
U can declare the global variable in your .h file or in your .m file before @implementation
5 Jun 2014 by Member 10690757
aoa... i am new in objective C.i want to ask that my webservice is running on windows 7..how can i check it on ios that data is comin properly from webservice or not???
5 Jun 2014 by KarstenK
Just try it: prepare the webservice on the iis and make a query from the ios. The URL should be the URI from the iss.or try it with a website. check that the data is accessable.
10 Jun 2014 by Member 10690757
aoa i am making an f..app of finance system. i had maked web method login name in c# json wcf.but whenever i call this methos in ios it is getting a thread...my code for login form is:(IBAction)yes:(id)senderUIAlertView *msgbox=[[UIAlertView...
10 Jun 2014 by KarstenK
it is the "normal" behavior if one of both isnt a valid string. check the code path of creating st in a more detailed fashion.SBJSON *parsedata=[[SBJSON alloc] init];dic=[parsedata objectWithString:jsondata error:nil]; //error check!!!if([dic count]>0)//too simple check{NSMutableString...
4 Aug 2014 by KarstenK
check the dic result like thatNSString *s = [dic objectForKey:@"loginResult"];if( s == nil ){ NSLog(@"ERROR: No loginResult provided");}consider writing clean and stable code :-O
22 Apr 2014 by Member 10690757
i want to ask story board is good for working or nib files??
22 Apr 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
There are many discussions on this.1. iOS User Interfaces: Storyboards vs. NIBs vs. Custom Code[^]2. Storyboards and Nibs: When To Use Which, and How to Mix[^]3. Storyboards vs NIBs vs Code: The Great Debate![^]4. Which is better : StoryBoard / NIB / Programmatic UI[^]
28 Jul 2015 by Richard MacCutchan
See Code Project Quick Answers FAQ[^].
1 Jan 2011 by Sagarkadam
How to reinitialize (not appending )the mutable string to other value or string...?
1 Jan 2011 by Sandeep Mewara
string firstString = "This is the initial string.";firstString = firstString + "I am re-intializing it. It's being recreated based on how string addition work. It's not getting appeneded, instead new string created and then whole thing assigned to it!";Read on String Vs StringBuilder....
22 May 2012 by Sathish Kumar Namachivayam
NSMutableStrin...
11 Jun 2014 by Member 10690757
can i run my project which waz in simulator 4.2 , on simulator 6.0?
11 Jun 2014 by KarstenK
You should update your project to start it with the actual SDK. Tons of improvements are waiting for you. I guess there will be breaking changes like ARC or some security issues. Read the fine Apple doc. It shouldnt be big problems.A big help are also the transitioning wizards in Xcode....
26 Apr 2014 by Member 10690757
aoa... i want to ask which is better service for ios??? json or xml format???thanx,
26 Apr 2014 by Manas Bhardwaj
In general, JSON format is more flexible and lightweight. Look at this article. It also suggests to have JSON implementation esp. for iOS devices.http://www.seguetech.com/blog/2013/04/01/xml-vs-json-web-services-best-choice[^]
10 Jun 2014 by p@y@l
I have created a cordova application.The databases are created using websql.I am in a need to access the database and zip the file for backup.I need to know how can I access the database from where it is stored using objective c?Is there anyway or is it not possible?Anybody please give me...
8 Jun 2014 by KarstenK
Data and apps are separated in iOS, so you cant access on the same device. But if the cordova is a server it will work. One way is SOAP/XML or JSON.Here is a quiet good sample that enlights the principles.
4 May 2015 by Member 11360293
I have a mainViewController with a container view in it. I'm trying to access theMainViewController from the container view.Here is my code:self.theMainViewController = (theMainViewController *)self.parentViewController;NSIndexPath *indexPath = [NSIndexPath indexPathForRow:idx...
4 May 2015 by KarstenK
It shows some weakness in your class design. You should stick to the MVC paradigma which inlcudes the separation of data, UI and handling to events.You need to define and set a (weak) property for it. I would recommend to create a protocol and a delegate.
17 Feb 2015 by raniam
hi,I'm using XCode to generate an iOS app, and I need to run it on the device itself (iPhone 5S), and my app requires a digital certificate, so I've generated a digital certificate (.pfx)and added it to the keychain access on Mac, followed I've also installed it on my iPhone 5S (in...
15 Jan 2014 by lisalis
How to print the Date and Time on top of the Photos which is taken from the IPAD. Thanks in Advance.
24 Feb 2015 by Member 11360293
I have sqlite implemented in my xcode project. It gets its data from a UITextField. There is a texField that gets added programmatically everytime the user clicks a button. I will be recreating the 'same' textField. (Kind of.) How can I get the textField's data to the sqlie file?SQLite...
24 Feb 2015 by KarstenK
You will only get the text-string of your textfield in the database. If you have a varying count of textfields you must save the count or some logic would should recreated.You need to run an INSERT QUERY on SQLite.
3 Mar 2015 by Member 11360293
I have a custom `UITableView` with different cell id's. I'm trying to add a row when the button gets selected. Here is my code: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return self.numberOfRows; } -...
3 Mar 2015 by KarstenK
It is absolut that what you have coded. Set a breakpoint in cellForRowAtIndexPath: and you will see it. If you create a new cell all values are as initialized (or empty). You must fill it with some values.Have you created that cell type in the interface builder in the used tableview.PS:...
6 Apr 2014 by Brainy Girl
Hi,I'm new with objective c and xcode.I want to add more sections to the tableView when the user clicks on a button and add rows to that sections when the user clicks on another button.and when the user taps on any cell a new view should be presented that will contain label and a...
4 Dec 2001 by Sidney Chong
The CMenu class is a great help when it comes to manipulating menus, but unfortunately it doesn't implement serialization. CSerializableMenu is a subclass of CMenu that provides serialization support.
13 Jun 2014 by Michael Gledhill
How to add an fade-in message to your iPhone app in 5 minutes
28 Apr 2019 by Phil Hopley
In this article, we will add AI to an existing ROS (Robot Operating System) House Bot.
27 Nov 2012 by Member 9628702
I have a winforms application which consists of a Van class and a delivery class.Van class:public class Van { private string VanNumber; public string vanNumber { get { return VanNumber; } set { VanNumber = value; } } ...
28 Nov 2012 by DaleMoz
I assume you have a List bound to ComboBox called, say, VanComboBox - the command you are looking for is:((Van)VanComboBox.SelectedItem).Deliveries.Add(DeliveryItem)
20 Apr 2012 by User 8157675
Hi all! Can anyone tell me, how to add two __m128 (float) variables using Accelerate framework
10 Jun 2014 by Santosh Sharma (go2santosh)
Finally iOS developers get a new programming language as advanced as C# and Java
28 May 2016 by Member 12350964
I am working on a project where i have to coordinate with .net team.. I need the equivalent code for the below mentioned AES encryption algorithm(written in C#) in objective -C.. I have tried using AESCrypt and CommonCrypt but its not woking well..getting different encryption value in both...
28 May 2016 by Garth J Lancaster
The obvious thing is that the parameters for whatever libraries you're using on each side have to be the same - there are too many to name here, padding is the usual one that gets messed up (and would be consistent with the error you saw) here's a link to someone who says they have working...
9 Jan 2019 by steveb
Describes all aspects of MFC serialization mechanism
15 Oct 2015 by hasnain_ahmad
I am building an android app that already build in iOS. I am novice to Objective-C.I want to find the alternative classes in java, so that I can implement the logic in java that is built in Objective-C.Here is my java code.String oldestDateString = "2015-10-01 00:00:00";String...
19 Jun 2007 by lano1106
Exploring the MFC GDI classes' inner working and proposing an alternative
11 Jan 2021 by Md Sadham
DESIGN: In my app, am using iMessage post option. Its works perfectly with one silly problem. Here is my code:if(!TARGET_IPHONE_SIMULATOR){ if ([MFMessageComposeViewController canSendText]){ MFMessageComposeViewController *MFMsgPicker = [[MFMessageComposeViewController...
10 Apr 2015 by KarstenK
It looks like it is a default value bei Apple if using an empty string. (It is something else than nil)MFMsgPicker.recipients = nil;worked fine. As always: if you dont need it - dont do it. But why arent you giving some useful value to it?
22 Jan 2022 by Member 15509240
Hi, I saw your query, and in my husband iPhone 13 pro phone I always keep seeing last mms(in iMessage)sent to “buddy name” but there is no contact exist with that name. Can u help?