का कारण बनता है जहां आप एक बटन दबाते हैं जहां आप एक बटन दबाते हैं तो UIAlertView
आता है और इसमें 3 कस्टम बटन के साथ UIView
है। अब तक सबकुछ काम करता है। जब मैं 3 बटन में से किसी एक पर क्लिक करता हूं तो मैं UIImageView
की छवि को बदलना चाहता हूं और यह भी काम करता है। समस्या यह है कि जब भी मैं अपने ऐप्स शुरू करने का प्रयास करता हूं, तब से कहीं भी एक सिगबर्ट नहीं हो रहा है।स्वयं को सेट करना। Window.rootViewController SIGABRT
SIGABRT
इस लाइन पर मेरी AppDelegate.m
में होती हैं:
self.window.rootViewController = self.viewController;
किसी मेरी मदद कर सकते हैं कि बहुत अच्छा होगा और जिस तरह से im द्वारा बहुत xcode और के लिए इस्तेमाल नहीं ऑब्जेक्टिव-सी तो मैं नहीं है एक संकेत यह क्यों हो रहा है।
यहाँ मेरी viewController.h
#import UIKit/UIKit.h (i removed < > cause they were hiding everything inbetween in the post.)
@interface savingstatusViewController : UIViewController {
UIView *loginView;
UIImageView *statusImage;
UIAlertView * MyTicketAlert;
}
- (IBAction)status:(id)sender;
@property (nonatomic, retain) IBOutlet UIView *loginView;
@property (nonatomic, retain) IBOutlet UIImageView *statusImage;
@property (nonatomic, retain) IBOutlet UIAlertView * MyTicketAlert;
- (IBAction)green:(id)sender;
- (IBAction)yellow:(id)sender;
- (IBAction)red:(id)sender;
@end
है यहाँ मेरी viewController.m
#import "savingstatusViewController.h"
@implementation savingstatusViewController
@synthesize loginView;
@synthesize statusImage,MyTicketAlert;
- (void)dealloc
{
[super dealloc];
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
}
- (void)viewDidUnload
{
[self setLoginView:nil];
[self setStatusImage:nil];
[super viewDidUnload];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return YES;
}
- (IBAction)status:(id)sender
{
MyTicketAlert = [[UIAlertView alloc] initWithTitle:nil message:nil delegate:self cancelButtonTitle:nil
otherButtonTitles: nil];
[MyTicketAlert addSubview:loginView];
[MyTicketAlert show];
MyTicketAlert.frame = CGRectMake(0, 1000, 440, 110);
}
- (IBAction)green:(id)sender
{
statusImage.image = [UIImage imageNamed:@"etat_controle.png"];
[MyTicketAlert dismissWithClickedButtonIndex:0 animated:YES];
}
- (IBAction)yellow:(id)sender
{
statusImage.image = [UIImage imageNamed:@"etat_attention.png"];
[MyTicketAlert dismissWithClickedButtonIndex:0 animated:YES];
}
- (IBAction)red:(id)sender
{
statusImage.image = [UIImage imageNamed:@"etat_danger.png"];
[MyTicketAlert dismissWithClickedButtonIndex:0 animated:YES];
}
@end
विंडो शुरू करने और नियंत्रक देखने के लिए कोड कहां है? क्या आप इसे पोस्ट कर सकते हैं, कृपया? – fbrereto
मुझे एक ही समस्या मिल रही है :( –