I've got a bizarre what-seems-like-a-over-release issue in a tab bar application. My advance apologies for the complexity of this problem description. Hopefully a little example code will help.
I have my application delegate MyAppDelegate set up as the UITabBarControllerDelegate:
- (BOOL)tabBarController:(UITabBarController *)tabBarC...
Hi All,
i'm trying to insert the url links in the SQLite3 database but its crashing
does any one have any idea ... y its happening ?
if i statically trying to insert any url, it works but dynamically when i get urls of navigated web pages.... they do not insert....
please suggest me how to make it work. I'm using SDK 3.2
this is my i...
I have been going up and down through all kinds of reference docs and examples over the web but I just can't get how to get what day, month, year, hours, minutes will it be for a given timestamp in Objective C. Any ideas? The code I'm using for the purpose is like this:
NSDate *date = [NSDate dateWithTimeIntervalSince1970:128618100...
When I try to get a h file that inherits from UITableViewController to conform to NSCoding, I can't switch views.
- (id) initWithCoder:(NSCoder*) coder
{
[self init];
return self;
}
Inserting the above code into the m file is what causes the problem. Why is that?
...
So far I have the following:
- (id)initWithCoder:(NSCoder*) coder
{
self = [super initWithCoder: coder];
if (self) {
// Call a setup method
}
return self;
}
Am I supposed to put the code to load the array in here? What could should I put and where should I put it?
...
Hi all,
I have an already running iphone app with target OS 3.1. I am trying to transform it into a universal app.
I am not going to change the model, only the xib.
So I wrote the ipad xib in IB, then I went to info.plist and add MainIpad Nib for ipad pointing to a proper MainIpad.xib.
I also set Target Device Family in project info to ...
Is there any grid-like control in iPad SDK?
...
This will save an array (I think).
- (void)encodeWithCoder:(NSCoder *)encoder {
[encoder encodeObject:myArray forKey:@"myArray"];
}
Do I have to directly call this method when I want to save an array or do I have to do something else?
...
This will load an array
- (id)initWithCoder:(NSCoder*) coder
{
self = [super initWithCoder: coder];
if (self) {
myArray=[coder decodeObjectForKey:@"myArray"];
}
return self;
}
What is the code that will call this function so that the array can be loaded?
...
[[NSUserDefaults standardUserDefaults] setObject:myArray forKey:@"myArray"];
I'm trying to figure out how to save and load an array using NSUser Defaults. I already have the NSCoding delegate methods defined, just need to know the actual commands to execute that will call those methods.
...
I have an UIButton to which an UILabel was added as a subview.
Is there an easy way to get the UILabel back out of it so I can change it's title ?
...
I have a program that ran in iOS 2.0 and now am making some updates to it. I don't think I have done anything that won't be available in 3.0, but I don't have a 3.0 device around to test it on. I do know that I updated one deprecated function addTimeInterval to the new version dateByAddingTimeInterval
a few questions -
1) Is there ...
Is there a tutorial for saving and restoring an array of custom objects?
...
I'm developing a PhoneGap app, extending it with native stuff.
I can make an UIView like this:
[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]
and show some stuff like ActionSheets here. But the MBProgressHUD doesn't show up in this view.
So how do I get the main view (or the PhoneGap's WebView)?
...
I am trying to authenticate a GKLocalPlayer with Game Center. However, the code supplied by Apple
- (void) authenticateLocalPlayer
{
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {
if (error == nil)
{
// Insert code here to handle a successful authentication.
...
Consider the following code
[coder encodeObject: properties forKey:@"properties"];
Are there any restrictions on what kind of object is passed as an argument to encodeObject? Can it be an object from a custom class?
...
Is it possible to simply duplicate ipad display to TV out (assuming both have same resolution)?
Code like this doesnt seem to work (it is a pretty naive implementation)
int i=0;
for (UIScreen *screen in [UIScreen screens])
{
if(i>0)
{
UIWindow* extWindow = [[UIWindow alloc]init];
extWindo...
Let's say that my application state is extracted into an object (so that all information specific to app instance is contained in one object) and that object supports nscoding protocol. How can i easily persist it and load it on exit/launch of my application?
My current code looks like this
- (BOOL)application:(UIApplication *)applicat...
Hi Guys,
I have a list reusable UItableViewCells. As what I want: after selecting one of the cells, the app should update the images on each Cell.
For solving this requirement, I use method visibleCells to fetch all the cells from UITableView, and update the images in each cell by iterating the returned cell array.
But the problem is:...
When I look in the console I get this message
2010-09-18 17:04:05.284 Wasted Time[8998:207] *** Assertion failure in -[UIActionSheet showInView:], /SourceCache/UIKit_Sim/UIKit-1145.66/UIAlert.m:7073
2010-09-18 17:04:05.286 Wasted Time[8998:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'I...