Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Pades

macrumors newbie
Original poster
I have a problem with my app in xcode. It worked good but when I tried Indicator my ViewController.xib doesnt show iphone. I have only empty ViewController.xib and iOS simulator return "Thread 1 : signal SIGABRB". I'm desperate I am trying everything. But it always doesnt work. I add my complete app. Thank you for replies.

Code:
https://mega.co.nz/#!GJMDXKTQ!E2MEp3XC1otB_zv935JVGDnJVV4mrIGVaY_2APX5wWs
 
I have a problem with my app in xcode. It worked good but when I tried Indicator my ViewController.xib doesnt show iphone. I have only empty ViewController.xib and iOS simulator return "Thread 1 : signal SIGABRB". I'm desperate I am trying everything. But it always doesnt work. I add my complete app. Thank you for replies.

Code:
https://mega.co.nz/#!GJMDXKTQ!E2MEp3XC1otB_zv935JVGDnJVV4mrIGVaY_2APX5wWs

Rather post the code here for everyone to see - will be much easier than downloading the project.
 
Rather post the code here for everyone to see - will be much easier than downloading the project.

Okej so this are my files...

What Tander meant was that we normally post code in these forums using the
Code:
 tags. As in:

[B]AppDelegate.h[/B]
[CODE]#import <UIKit/UIKit.h>

@class ViewController;

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) ViewController *viewController;

@end

See this Sticky for more help: Posting code, please use the
Code:
 tags[/URL]
 
I am sorry is it better
ViewController.m
Code:
#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController
@synthesize Label, Name, Stav, Stav2;

-(IBAction)Button1:(id)sender
{
    NSMutableURLRequest *urlRequest = [[[NSMutableURLRequest alloc] init] autorelease];
    NSString *urlString = [NSString stringWithFormat:@"http://freetech.sk/test.php?name=%@",Name.text];
    [urlRequest setURL:[NSURL URLWithString:urlString]];
    
    NSData *urlData;
    NSURLResponse *response;
    NSError *error;
    urlData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&response error:&error];
    if(!urlData) {
        Stav.text = @"Nepodarilo sa pripojit.";
    }
    else
    {
        NSString *aStr = [[[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding]autorelease];
        if([aStr isEqualToString: @"1"])
        {
            Free.hidden = YES;
            Stav2.hidden = YES;
            booked.hidden = NO;
            Stav.hidden = NO;
        }
        else
        {
            booked.hidden = YES;
            Stav.hidden = YES;
            Free.hidden = NO;
            Stav2.hidden = NO;
        }
    }

}

-(void) textFieldShouldReturn: (id) sender
{
    [sender resignFirstResponder];
}

-(IBAction)dismissKeyboard
{
    [Name resignFirstResponder];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    Stav.hidden=YES;
    Stav2.hidden=YES;


}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)dealloc {
    [super dealloc];
}
@end

ViewController.h
Code:
#import <UIKit/UIKit.h>

@interface ViewController : UIViewController

{
    UILabel *Label;
    UITextField *Name;
    UILabel *Stav;
    UILabel *Stav2;
    IBOutlet UIImageView *Free;
    IBOutlet UIImageView *booked;
}

@property (nonatomic, retain) IBOutlet UILabel *Label;
@property (nonatomic, retain) IBOutlet UITextField *Name;
@property (nonatomic, retain) IBOutlet UILabel *Stav;
@property (retain, nonatomic) IBOutlet UILabel *Stav2;

-(IBAction)Button1:(id)sender;
-(IBAction)dismissKeyboard;

@end
 
Last edited:
And it also solves my problem with the fact that I disappeared from everything. XIB?
 
And it also solves my problem with the fact that I disappeared from everything. XIB?

Maybe. First, get the app to run without crashing. Then you can concentrate on debugging why your screen doesn't show.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.