Ok so I have a UIViewTable and a UISearchBar with two scope buttons. The idea being that when I press a scope button the datasource for UIViewTable gets changed but I am getting
EXC_BAD_ACCESS error.
I have the following code in my UIViewController SearchViewController.m:
- (void)searchBar:(UISearchBar *)searchBar selectedScopeButton...
I want to refer to the value of an empty text field because I want make an if function that if there is nothing in the UITextField the text of the UITextField will become "nothing".
...
My app is made up of a TabBarController, each tab with a UITableView.
On launch I parse an XML file from my server into an Object class and then display the objects in the first tableview.
My question is, what do I do when I want to parse a second XML file? Currently, when doing so, the information in "XML-file-2" will overwrite the ob...
I'm a little confused between a unichar and a char. Can I treat unichar's similar to char's?
For example, can I do this:
-(BOOL)isNewLine:(unichar)c {
if(c == '\n')
return YES;
else
return NO;
}
...
The object inherits from NSObject. Is there a method to create a copy of it as a new object?
(Edit — I'm trying to copy a UIButton).
...
Anyone know a good solution?
So far I have not found a better way than using File>New file and then copying contents from old file to new.
You can probably duplicate in Finder and re-import but that's almost same amount of work: switching to finder, duplicate, import new files.
Doing this with one class is not so hard, but what to do ...
After making a quadratic equation solver for the iPhone I want to take it a step further by giving the user the ability to view the graph of the solved quadratic equation. I need some guidance on how to do so using the iPhone SDK and the available frameworks.
...
What is the objective-c syntax for documenting a method's usage? Is this done in the .h or .m file?
In C# one uses something like:
/// <summary>
/// Executes an HTTP GET command and retrieves the information.
/// </summary>
/// <param name="url">The URL to perform the GET operation</param>
/// <param name="userName">The username to ...
Currently I am working on a piece of software, which is currently written 100% in Objective-C using the iPhone 3.0 SDK.
I have come to a cross roads where I need to do quite a bit or string concatenation, more specifically, NSString concatenation and so far I have been doing it like this:
Objective-C string concatenation:
NSString *re...
Ever language has their famous and painfull errors. I will be fun to learn which errors earn this reputation when developing for the iPhone.
Please list yours!
I agree with GenericTypeTea
If you can please list the error code/message and the cause to make for a more useful post.
...
This code has no errors in it, but when i click the button nothing in the "if" statement
works! it doesn't crash or show errors... Btw im working in Xcode on an iphone app.
#import "MainView.h"
@implementation MainView
@synthesize MyButton2, MyMainTextLabel;
@synthesize MyButton3, MyMainTextLabel;
@synthesize MyButton2, Button2Lab...
I am writing a number of static libraries for the iPhone and wish also to have suites of unit tests. XCode 3 provides templates for both static libraries and unit tests but I am wondering how they should fit together in a static library project?
In my static library project I have created a target for unit testing but expect to also cre...
Hey guys,
Just to give background for my situation, I have a manager singleton that pulls data from a webserver and provides access to the downloaded data. I have several types of views that will consume this data, but only one view at any time will need to receive events.
I was just wondering what people prefer to use when they need t...
Is there a way to parse a website's source on the iPhone to get the URL's of photos on that page? If so how would you do that?
Thanks
...
I am downloading images using the NSURLConnection sendSynchronousRequest method and that works fine. However, occasionally I run into an issue where the image URL points to something other than an image file. For example, I found this non-image URL was causing issues: http://www.100plusposters.com/images/ExoticFlowers.jpg The URL ret...
Assuming that I have a typedef declared in my .h file as such:
typedef enum {
JSON,
XML,
Atom,
RSS
} FormatType;
I would like to build a function that converts the numeric value of the typedef to a string. For example, if the message [self toString:JSON] was sent; it would return 'JSON'.
The function would look something lik...
After countless tries I got my animation animating right (Why oh why is the layer's coordinate system Y flipped from the view's coordinate system, I will never guess) but it seems that it degrades the image quality for some reason:
(green circled are examples of the original good quality images, the red circled is to emphasize the dif...
Is there an equivalent of the .NET ManualResetEvent class available for use in Objective-C / Cocoa?
...
In my iPhone app, to restore previously viewed tab, on launch I set the setSelectedIndex: (also tried setSelectedViewController: as per docs but to no avail)
This works on iPhone OS 3.0 - however on OS 2.x the selected index greater than 3 (the first 4 tabs) doesn't switch to the required view. This is documented by Apple here: http://d...
I have a complex question which may be very simple for you guyz.
I have a
NSMutableString = "This is spinach";
I have 3 Booleans. Please ignore the code. I havent used proper syntax,functions.
if (boolA) appendstring"and apples";
if (boolB) appendstring"and mangoes";
if (boolC) appendstring"and oranges";
every boolean cor...