Here's a fun one I've been trying to figure out. I have the following program:
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(int argc, char *argv[])
{
string s("5");
istringstream stream(s);
double theValue;
stream >> theValue;
cout << theValue << endl;
cout << stream...
Hi
I have been trying to set breakpoint in my unit test code using SenTestCase framework in xcode 3.2.2. I can see the build results properly but unable to set a breakpoint.
Anyone having an idea please help.
...
Hi there!
I am having big problems since I downloaded the beta version of iPhone SDK 4.0.
Okay, I just started to look at iPhone development a few weeks ago, but I cannot figure out how Xcode is supposed to work:
whenever I start a new project, I choose a template like "View-based application" or so. Now, the target will always (at leas...
I have defined my own environment variable (VERSION) in a .xcconfig file and based my configurations on that as described at http://www.silverchairsolutions.com/blog/2008/03/automating-cocoa-deployments-with-sparkle-and-xcode. My environment variable is indeed expanded in Info.plist but not in my Settings.bundle/Root.plist. PRODUCT_NAME ...
According to the (in)famous iPhone Developer Program License Agreement change
3.3.1 — Applications may only use Documented APIs in the manner
prescribed by Apple and must not use
or call any private APIs. Applications
must be originally written in
Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit
engine...
I'm loading 5 images from disk but I want the 1st image I read to show as soon as possible. Right now I do
UIImage *img = [UIImage imageWithContentsOfFile:path];
in a for loop but since imageWithContentsOfFile:path isn't blocking all 5 images wind up getting read from disk before the first one will appear (because they're all using u...
My app has to connect to a server, but sometimes when I test my application I don't have my server online, so the app remains stuck when opening.
How I can test programmatically if the server is online? Is there something like ping so i can verify the state of the server and then doing the normal work or not if it is offline? Thank you!
...
I am putting in a uitableview and I'd like to have each row divided into left and right. Sort of like this: http://blog.danilocampos.com/wp-content/uploads/2009/01/photo.jpg
Can someone explain how to do this?
Thanks.
...
I'm trying to play a sound based on which button is pressed using AVAudioPlayer.
(This is not a soundboard or fart app.)
I have linked all buttons using this code in the header file:
@interface appViewController : UIViewController <AVAudioPlayerDelegate> {
AVAudioPlayer *player;
UIButton *C4;
UIButton *Bb4;
UIButton *B4;
UIButton *A...
I've read plenty of requests about a full-on custom UINavigationBar background, but what I want is to overlay a logo on the default UINavigationBar instead of text. Preferably, I'd like to apply it to a subclass of UINavigationBar called CustomNavigationBar.
Thanks in advance.
...
Hi all,
Trying to compile a iPhone/iPad application with SDK3.2 and am getting this error:
Undefined symbols:
"_main", referenced from:
Start in crt1.10.5.o
Symbol(s) not found
Collect2: Id returned 1 exit status
I think it's telling me that it's somehow trying to work with code from another SDK but searching the web has not provide...
SDK: xCode 3.2
Device: iPhone 3GS OS 3.13 / iPad
Case:
In Apple Sample Library [ScrollViewSuite]. The [2_Autoscroll] project.
In [ThumbImageView], We can drag and drop to scroll the view. So that we can see any menu item by touch the screen and do moving.
How to implement this feature in [TagDetectingImageView] ?
I have try to co...
Hi, all.
I've been having a tough time entering input with gdb using XCode or Eclipse. Every time the debugger hits std::cin, it looks like its waiting for input, but fails to accept it. I've scoured the internet for more information, but am having trouble finding anything.
What do I need to do to get cin to work with gdb? For referen...
I have this type of data categories:
today news -> news item
jobs news -> news item
general news -> sub category news -> news item
So i have followed the very good tutorial 'Building an iPhone App Combining Tab Bar, Navigation and Tab' http://www.youtube.com/watch?v=LBnPfAtswgw and all is good with the 1st two 'todays news' and 'jobs...
I want to programatically add multiple UIButtons to a view - the number of buttons is unknown at compile time.
I can make one or more UIButton's like so (in a loop, but shorted for simplicity):
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button addTarget:self
action:@selector(buttonClicked:)
forContro...
Hi, This is a simple question:
I have 2 different view controllers, and each one has its own data stored in its .m file.
I want to take a value, for instance, an integer value (int i=3;) that is declared in ViewController1 and pass it to ViewController2, so I will be able to use that value in the second view controller.
Can anyone plea...
Hello guys,
I'm having troubles converting Xcode project containing iPhone target to add Cocoa application. Could anyone help me?
...
Are there any tools out there for Objective-C / Xcode? Something that can do one or more of the following:
Detect unused imports
Auto-synthesize properties
Autogenerate dealloc method from retained properties
Provide method stubs for interface
...
To Xcode xPerts:
I have been doing Java in Eclipse for about 9 years now and I have really gotten used to the power of the refactoring tools. There are a few operations I do all the time. I am looking for equivalents in Xcode since it has better support for objective-c than eclipse. (I'm not at my Mac as I write this. So some of this...
Is there any way to disable the auto-indent Xcode performs to align colons when breaking up a long method name into multiple lines?
That is, I'd rather not have this:
UIBarButtonItem *longDescriptiveButton = [[UIBarButtonItem alloc] initWithTitle:@"Title of Button"
...