Posts tagged XCode
Objective-C: UIAlert or asking for confirmation
0
While start XCoding, I faced a new challenge : how to create modal, single use confirmation dialogs? So after some digging in the internet, I found out that this can be actually done pretty simple and elegant. This will be very useful if you want to display some deletion confirmation or ask for user permission to use the camera or GPS sensor. All you have to do is just create a UIAlert and the IBAction hooked up to your “Nuclear launch” button, and then have its delegate decide whether to destroy the world or not.
In the header file you have to add this declaration of the action performed when the fatal button is clicked:
- (IBAction) btnLaunchNuclearStrikeClicked:(id)sender - (IBAction) deleteButtonClicked:(id)sender; (more...)
UIImageView setImage problem
3
While working for this semester’s CSCW lab project, I encountered a strange situation: no matter what I did, the UIImageView didn’t load the image. After some digging on the Internet about this, I found out that first thing to look for is whether you’re sending the setImage message to the UIImageView instance you expect.
Being newbie in XCode and Apple’s technologies in general, I forgot to use NSLog. So my advice is to check and check often with NSLog for a nil pointer in the same place you’re trying to set the image. Obj-C loves to make freshman crazy by sending messages to nil pointers without any warning or other problem. So check if the pointer is nil, double check the IBOutlet connection to the UIImageView in IB.
Programming languages and sensors
0For the moment we expect to use either one of those strategies to implement our idea
1.Use Wiimote, an iphone, and a skateboard for implementing this game .
- Wiimote : as sensor for capturing the type of movement that is currently implemented.
- iPhone : read the sensed values from Wiimote and implement Game Interface
- Expected Language for implementation : Objective C .
2. Use iPhone , and adruino board that enables wireless communication with the following sensors:
- Bending sensor.
- Accelarometer.
- Expected Language for implementation : Objective C , and C++
New team created for DIS2 Project
0We are proud to announce that we created a team that will accept the challenge of the DIS 2 Project: design an Exertion Game.
The team is formed by:
- Loredana Ene – 286052
- Fariha Atta
- Poenaru Radu – 286053
- Abd al Rahman
We are students of RWTH Aachen, learning in Bonn-Aachen International Center for Information Technology in Bonn.
[Note: Here I will present my work, the entire project can be found on http://dis2project.blogspot.com]
Xcode – String concatenation
2
Don’t be fooled that Objective-C is a Object oriented language. For decades operators overloading is something standard in almost all of them.
But in Objective-C you don’t have it. Mostly, I believe that comes from the struggle of Apple guys to assure the stability of the system. A lot of errors can come from poorly designed overloads, thus the crashes can appear.
Now let’s put some hands on code.
In C, Java or Pascal you would have written something like the following for string concatenation:
string1 = string2 + string3;
But in Objective-C you need to do something different:
NSString *myString = @"http://www.mywebsite.com"; float myValue = 4; NSString *result = [NSString stringWithFormat:@"%@?query=%.3f&a",myString,myValue]; myLabel.text=result;
But beware! Read the documentation regarding formats!
It is very important to use the correct String Format Specifiers:
- %S is used for a "Null-terminated array of 16-bit Unicode characters". And %s is used for a "Null-terminated array of 8-bit unsigned characters.
- %s interprets its input in the system encoding rather than, for example, UTF-8.". The key being that these are arrays, not objects.
- %@: "Objective-C object, printed as the string returned by descriptionWithLocale: if available, or description otherwise". That sounds a bit more like a NSString. It’s an Objective-C object after all.
Apple’s Xcode : symbol(s) not found at Line Location Tool:0
1I am a begginer in XCode. My first real application for iPhone requires connection to a webservices. Since I wanted to use RPC XML or Soap, I searched on internet and found few examples (Apple programmers aren’t so into code sharing) to implement my requests. I want to mention that since the app is in the stage of proof of concept, the code is still not structured in classes separating the data and business layers as should.
So I took the example from CocoaDev and expected to run flawlessly.
But after pasting the code in my application and build it, a lot of unknown errors started to show:
iPhone Startup Tutorial
0
This is the start of all iPhone Developers. It will be an extremely brief tutorial meant just for those which are at the absolute start of iPhone development.
First checks:
1. System requirements: verify if the iPhone sdk needs are met.
2. Go to Apple’s iPhone Developer Center , then download the SDK.
3. As you’ll need some experience and code to work on, download the Hello World sample application.
4. Double click (gotcha!) on the the Hello World project file (the .xcodeproj).
5. Alternatively, you can use the research assistant to increase your knowledge about the iPhone libraries.
6. Optional, but really recommended: look deeply into all source code examples that you can find and use the research assistant often.
Take a big breath and … just start!
Good luck
Baby step into Apple’s iPhone programming – Cocoa Touch
0
I just started the most interesting lab of my life : Programming Apple’s iPhone using a MacBook with Cocoa Touch.It is held in Frauhover FIT, under Prof. Dr. Wolfgang Prinz and Dr. Wolfgang Gräther. In this lab we will start develop an iPhone application using Usability principles, Apple’s User interface Guides.
For me it’s the best opportunity to take a peak into the neighbor’s( Apple’s
) garden. For long time I was just curious about their technology and ways to program. But I lacked the hardware, because you can develop for Mac and iPhone only in MacBooks, Macs and obviously need an iPhone for testing.
So I want to share my experience as a newbie into Apple stuff. (more…)
Working in Fraunhofer Institute of Technology
2Starting today, I work as a Student Helper in Fraunhofer Institute for Applied Information Technology. The branch from Sankt Augustin, which I joined, is focused on the research of human-centered computing in a process context. I will activate in the Cooperation and Community Support department, which deals with the research and development of community portals, (mobile) communities and cooperation, Internet-based groupware, cooperative knowledge management, application service providing for cooperative work and virtual teams, rating and recommender systems and cooperative learning environments.
The head of the department is Prof. Wolfgang Prinz, PhD and I will work closely with Mr. Nils Jeners, researcher in FIT. I had the pleasure of attending Mr. Prinz course, CSCW and Groupware, while being student in the Media Informatics Master, held by RWTH Aachen University. CSCW stands for Computer Supported Collaborative Work.
My first task is to study the Twitter community, applications based on it and the actual phenomena. My work should help in better understanding the aspects of human behavior, social interaction between humans and in particular the tools and services used for microblogging. This will allow also to discover ways to extract patterns in the context of this technology, who is changing the ways that people interact and socialize over the Internet.