This is the first iPhone application i am working on.
To use the application, the user has to login to our server. I am done with that part.
Now the problem i am facing is how to logout the user from the server, deallocate all the memory and start afresh without quitting the app. After the user logs out, i want the exact same things to...
I can get the UIPinchGestureRecognizer handler to work with scaling an object but I don't want to scale I want to change the size. For example I have a UITextView and I've attacked a UIPinchGestureRecognizer gesture to it and if the user pinches I want to change the width of the textview to match the pinch. I don't want to scale it so t...
In Java, I may have a class, for example, Utility and I have a static method called changeToCapitalLetter, so I can do something like this:
Utility.changeToCapitalLetter(myString);
How can I do the similar thing in Objective C?
Thanks a lot
...
I've read this article:
http://stackoverflow.com/questions/1225457/change-the-text-of-a-uilabel-uibarbuttonitem-on-a-toolbar-programmatically
But it seems not working for my auto-hide toolbar?
I also tried "barbuttonItem.title" to set the text, failed too.
Any idea? Much thanks!
...
yet anotherone that gives me grief.
In a SQLite3 DB Select I query for a date range specified in (NSDate *)fromDate to (NSDate *)toDate
const char *sql = "SELECT * FROM A, B WHERE A.key = B.key AND A.date between ? and ?";
After opening the DB I run the query in Objective-C as follows:
NSDateFormatter *tmpDatFmt = [[[NSDateFormatte...
Hi ! Need to override property setter of the parent class. In order to temporary block assignment. For example - selectedRange property of the UITextView. How can I do this ?
Thanks.
...
Hi,
I've developed an application to sync the Mac address book with another application.
I was using an NSNotification (kABDatabaseChangedExternallyNotification) which are sent every time the address book is edited to do the syncing.
However I found that if I 'overloaded' the address book (by adding 20 records really quickly or somethin...
I was failed to do that .. Any ideas?
...
I am using a UINavigationController to switch between views. What I would like is for each view to have the ability to control when it is swapped out for another view by having buttons within the view. All of the samples I've seen thus far have placed buttons on a toolbar, which is located on the root view containing the Switch View Cont...
Lets assume I have the string:
"Hello I like your shoes #today...!"
I am tokenizing the string by spaces:
return [string componentsSeparatedByString:@" "];
So my array contains:
Hello
I
like
your
shoes
#today...!
I want to focus on "#today...!" any word that has a # in the prefix I am changing the font color.
How can I make sur...
How can I change the style of pickerview. I want to change its white background to green color and its black frame to red color.
Anyone please help. I am a beginner.
...
I am adding a UILabel as a subview to a UIView and sometime later I want to hide it. It is assigned to a variable but I don't think setting the variables property Hidden after it's been added to the view will work (well it doesn't seem to anyway).
Is there a way to loop through the subviews in a view and then find the one that has a spe...
Hi
I was wondering if there are any memory/performance drawbacks, or just drawbacks in general, with using Class Methods like:
+ (void)myClassMethod:(NSString *)param {
// much to be done...
}
or
+ (NSArray*)myClassMethod:(NSString *)param {
// much to be done...
return [NSArray autorelease];
}
It is convenient placing a lot o...
This question is more to figure out how to look up classes and objects in objective-c but i lack the knowledge to figure out how to look this up so i pose the question here.
In .Net if i had a MyObject.MyValue the MyValue would be called a property, and I could look this up in MSDN. In java i would check the javadocs online (and that p...
Hi everyone,
I would like to use entity objects but not store them... I read that I could create them like this:
myElement = (Element *)[NSEntityDescription insertNewObjectForEntityForName:@"Element" inManagedObjectContext:managedObjectContext];
And right after that remove them:
[managedObjectContext deleteObject:myElement];
then ...
Hello,
I'm trying to create a application that will retrieve JSON data from an HTTP request, send it to a the application main controller as a JSON object then from there do further processing with it.
Where I'm stick is actually creating a class that will serve as a JSON class in which will take a URL, grab the data, and return that o...
Is there a better way to serialize an ObjC object than using /NSKeyedArchive?
I need to distribute the object through a C++ std:ostream-like object to put on another computer.
The object has over 122 members of various types... for which wants me to
[coder encodeObject: (id) forKey: @"blah"];
for all of them...
Does anyone have a...
hi,
i have following problem: i generate subviews UIView in an UIScrollView including UIImageViews.
NSArray *bilder = [[NSArray alloc] initWithObjects:@"lol.jpg", @"lol2.jpg", nil];
NSArray *added = [[NSMutableArray alloc] init];
UIImageView *tmpView;
for (NSString *name in bilder) {
UIImage *image = [UIImage imageNamed:name];
...
I have three view controllers, let's call them A, B and C.
When a button is pressed on view A, view B is shown using presentModalViewController:animated:
When the finish button is pressed on screen B, it dismisses itself. View A is notified whereupon it immediately shows view C, again using presentModalViewController:animated:
The pro...
I have an application that uses a tab bar and whenever it launches it crashes and gives me the following error and stack trace:
2010-04-22 16:15:03.390 iCrushCans[59858:207] *** Terminating app due to uncaught
exception 'NSUnknownKeyException', reason: '[<UIWindow 0x3e051a0>
setValue:forUndefinedKey:]: this class is not key value coding...