I have a simple function that should check if the view is at the home interface, and if not, bring it to the home:
function returnHome() {
if (UIATarget.localTarget().frontMostApp().navigationBar().name() == mainTitle) return true;
// set tab bar to calculations
UIALogger.logMessage("Set tab bar to main.");
if (UIATarge...
I downloaded the class files and demo program here: http://github.com/matej/MBProgressHUD
When I try to compile the program, I get several errors. The first one appears here:
CG_EXTERN void CGPDFContextAddDocumentMetadata(CGContextRef context,
CFDataRef metadata) CG_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_0);
On the second line t...
Hi all.
I want set my custom method "Home" with RightNavagation button how should I?
My code
UIBarButtonItem *barButton = [[UIBarButtonItem alloc] initWithTitle:@"DontWorryAboutThis" style:UIBarButtonItemStylePlain target:self action:@selector(home:)];
[barButton setImage:[UIImage imageNamed:@"home_btn.png"]];
[self.navigationItem s...
I create/push my ViewController, display some informations and navigate back to my RootViewController. While I navigate back the app crashes (EXC_BAD_ACCESS).
With Instruments I found out that the dealloc of my ViewController is called, which releases my wrapper class. In my wrapper class also the dealloc method is called. This dealloc ...
The easiest way to see this problem will be to run the sample project here:
http://drop.io/stackproblem
Basically, It's a uisplitviewcontroller which can be switched between 2 detail views, both of which are navigation controllers.
The problem is that it crashes with the following error:
MultipleDetailViews[8531:207] * Terminating ap...
I'm trying to send an NSString as an attachment using MFMailComposeViewController.
When I open the Mail I just have a "Part 1.2" Attachment.
Here's the code used:
MFMailComposeViewController* controller = [[MFMailComposeViewController alloc] init];
NSMutableString* writtenWillItBe=[NSMutableString stringWithFormat:@"...",...];
[contro...
I am having a problem converting a date/time string to an NSDate.
The date string I need to convert is: 2002-12-24T00:00:00-07:00
My date format string is currently yyyy-MM-dd'T'HH:mm:ssZZZ
The problem is the colon in the time zone.
ZZZ returns a string like: -0700 (without the colon)
How can I convert a string WITH a colon in the ti...
I have a iPad application which goes between two states, one using a SplitView the other a TableView.
Currently I have a single UIWindow object, and switch between views with the following code
-(void) switchToStateA {
[viewControllerB.view removeFromSuperview];
[window addSubview:viewControllerA.view];
}
-(void) switchToStateB {
[view...
If I have a method like this:
- (void) foo
{
}
Then I can access it through a selector like this:
@selector(foo)
But what if I have a method like this:
- (void) bar:(NSString *)str arg2:(NSString *)str2
{
}
Then how do I access it through a selector?
...
Hi all,
is iphone sdk 4.0 supports UIBezierPath since in documentation they told its available above 3.2 but they didnt told it is available in iphone or it just only for ipad.
...
I'm trying to use a method from a class I downloaded somewhere. The method executes in the background while program execution continues. I do not want to allow program execution to continue until this method finishes. How do I do that?
...
When I make an object to use in NIB, the object should implement -initWithCoder:. However I can't figure out regular pattern implementing this.
I have been used this code.
- (id) initWithCoder:(NSCoder *)aDecoder
{
if(self=[super initWithCoder:aDecoder])
{
// initialize my object.
}
return self;
}
But I have to make same cod...
I downloaded some code from http://github.com/matej/MBProgressHUD to show a progress meter when doing something.
This is the code that makes the progress meter pop up.
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
This will show a progress meter while the method myTask is running.
The strange ...
I have about 20,000 records (coming from an SQLite db) that I need to present to the user for possible choices, so conventional picker control is out of question.
Another possibility could be an indexed UITableView where user could check the desired value, however keeping all the 20K records in the memory doesn’t seem like a good idea.
...
HI all,
how to set an image as a wallpaper, programmatically, in iphone?
Suggestions are always appreciated.
regards
...
This piece of code works fine. However, if I change the animated parameter to YES it crashes.
AccountViewController *accViewController = [[AccountViewController alloc] initWithNibName:@"Account" bundle:nil];
[self.navigationController pushViewController:accViewController animated:NO];
[accViewController release];
What could be wrong?...
The UI gives 3 options for UIScrollViewIndicatorStyle, but I want to make the UIScrollView indicator red, which is not one of the standard styles.
Can I do this? If so, how?
...
Hello,
I am wondering why my UINavigationController is not letting me set a title. It lets me change the tint of the navigationBar, but the title and rightBarButtonItem I set just get ignored. Why?
Here's my code:
taps = 0;
UIView*controllerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
controllerView.backgr...
I have a program which works normally. Then I downloaded some code from http://github.com/matej/MBProgressHUD to show a progress meter when doing something.
This is the code that makes the progress meter pop up.
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
This will show a progress meter while...
I am making my app for 3.2 but I recently started trying the new SDK 4.2beta2 and my app does not shows the right view. Is just black.
I checked and the splitViewController is indeed loading the right controller and the object is on memory but is not shown. I wonder if someone has experienced the same problem and/or where to start look...