In my application, I am using Tab bar controller.How to change from Portrait mode to Landscape mode and vice versa? I can change mode with out Tab bar controller by just returning YES in shouldAutorotateToInterfaceOrientation method but when a view consist tab bar it is not working.Please, provide a solution. I am thankful to you?
...
Hello,
i m facing problem of copy paste functionlity in iphone. i m using viewcontroller XIB. in XIB i have list of textFields and one button and click on button validation are there for all fields are mandatory. so problem is when i writing something on textfield then copy - paste menu not appear in iphone.
But when we press the butto...
Has anyone a idea how can i strike/cross out a UILable with Anmimation - like a "Todolist function"?
In Objective C.. ;)
...
Hi All!
I am a beginner at Obj-C/Cocoa Touch/iPhone OS.
I wish to have a background for my app with different images everytime the the view is called.
Say I have 10 images. I 've used it like this:
//random image generation
NSString* imageName;
int aRandomNumber = arc4random() % 10;
imageName =[NSString stringWithFormat:@"g%d.jpg",aR...
Hi all,
I wrote a simple program to understand how objective-c works. This program is the i-ching, an ancient divination based on six lines response, calculated after launching three coins for six times, and then build an hexagram which is the reponse.
I am stuck at this, that I am sure has simple solution. This is how I defined the li...
float pi = 3.14;
float (^piSquare)(void) = ^(void){ return pi * pi; };
float (^piSquare2)(void) = ^(void){ return pi * pi; };
[piSquare isEqualTo: piSquare2]; // -> want it to behave like -isEqualToString...
...
Hi guys,
I have a custom layout tableviewcell for showing my normal tableview but when I search the tableview with the UIsearchbar the search results ignore the custom layout e.g. cellbackground.
Where can I layout custom cells for searchresults?
Thanks
...
Hi...
I am just starting with OSX development, and I am trying to get delegate notifications from a NSTextField. I've got the following code so far:
This is where I set the delegate:
- (void) awakeFromNib {
NSLog(@"Setting delegate");
[amountField setDelegate: [[TextfieldController alloc] initWithLog]];
}
And this is my Text...
Hello all,
I have developed an application in which I'm running a countdown timer. The timer fires a method every second. However, when the phone is in sleep mode, the timer becomes slow or even turns off.
I think I need to update the variables by calculating the time intervals using NSDate. Does someone knows how to do this?
BTW, o...
NSString *url = [NSString stringWithString: @"mailto:?subject=Wallpapers%203d%20App&body=Have%20fun%20with%20this%20unique%20wallpaper%20app"];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];
I am using this code to open the mail app at iphone in order the user to send an email.
I want to add a url link or imag...
object release without pool-just leaking?? is this memory leak???
if yes how can i avoid this???
...
Hi everyone
I am building an application that has to handle the parsing of several different kinds of XML files. As I want to standardize the procedure as much as possible, I created a singleton class which handles the parsing of any XML data. The class is handed two options, a unique identifier telling it what kind of XML data it is go...
Hi,
I am trying to write a sqlite resultset wrapper class for the iPhone, and I would like to be able to dynamically call sqlite3_column_int or sqlite3_column_text?
For example, in my fetchAll method, I would like to not know what exact data i'm returning, I just want to return it.
My goal is to have a class that doesn't care what da...
This code works fine on the iPhone and the iPhone simulator, but crashes the simulator when running on the iPad:
const char *createsql = [MYClass GetDBCreationString];
sqlite3_stmt *crts;
if (sqlite3_prepare_v2(database, createsql, -1, &crts, NULL) == SQLITE_OK) {
int success = sqlite3_step(crts);
if (success != SQLITE_DONE) {
...
Hi all,
I'm learning objective-c and cocoa touch at the same time as building an app so I've got a fairly simple question (I think), sorry I don't have enough brownie points on the site to show a visual diagram of my site.
But let me explain, I have the following
Main ViewController
ViewController A
ViewController B
ViewController C...
I've created my own Delegate for a ObjC class. The class itself deals with Core Data operations. Delegate methods are used to inform other classes about changes that happened to the datastore. The class that deals with the datastore is called Datastore and it's delegate is called DatastoreDelegate. A UIViewController of mine (ContactsVie...
I just began to work with Objective-C and I'm managing pretty well. My last challenge was to make a command line utility, which I could than use in AppleScript. But my code does not work, not in the terminal, not in the AppleScript. So I'm asking you, what's the error in this peace of code, that should be very plain and easy?
int main(i...
So my problem is that I have a NSManagedObject 'A' which has a has-many relationship to 'b'. So for each object of 'A', there can be many 'b'.
Now, I want to make a copy of 'b', so that 'b' can be modified, but not saved to the store, but 'A' can be saved'.
For example,
self.title = A.name;
setOfB = A.setOfb; // This is still managed...
I have a main view with a controller and two seperate view controllers with their own xibs.
something like
@interface MainViewController : UIViewController
{
FirstViewController* firstController;
SecondViewController* secondController;
}
I would like to have FirstViewController.xib and SecondViewController.xib so that I can p...
I am writing an API that wraps some core foundation web functionality that can return a number of possible error conditions. I am struggling with deciding the best way to handle error conditions that the API consumer should deal with (like network timeouts, receiving unexpected results, malformed XML, etc). I have come up with 3 differen...