Hallo,
seit heute stürzt meine App im iPhone-Simulator immer ab...ich bin echt verzweifelt und bin für jede Hilfe dankbar...
Hier der Quellcode:
Alles anzeigen
Vielen Dank im Vorraus,
Alex
seit heute stürzt meine App im iPhone-Simulator immer ab...ich bin echt verzweifelt und bin für jede Hilfe dankbar...
Hier der Quellcode:
Quellcode
- #import
- @class ClockController;
- @class FlashlightController;
- @class TranslatorController;
- @class RandomNumberController;
- @class WebGamesController;
- @class CalculatorController;
- @class TipCalculatorController;
- @class CurrencyController;
- @class AlcoholCalculator;
- @class BMICalculator;
- @class LoanCalculator;
- @class HolidayController;
- @class TapCounterController;
- @class GoogleMailController;
- @class GoogleLatitudeController;
- @class iGoogleController;
- @class GoogleBuzzController;
- @class GoogleReaderController;
- @class GoogleNewsController;
- @class GoogleDocsController;
- @class GoogleCalController;
- @class FacebookController;
- @class AppInfoController;
- @class YahooController;
- @class HotmailController;
- @class TwitterController;
- @class DecisionerController;
- @class ReaderSample;
- @class AltimeterController;
- @class EbayController;
- @interface UtilitiesViewController : UIViewController
- {
- IBOutlet UIScrollView * scrollview;
- IBOutlet UIPageControl* pageControl;
- BOOL pageControlIsChangingPage;
- IBOutlet ClockController *clock;
- IBOutlet FlashlightController *flashlight;
- IBOutlet TranslatorController *translator;
- IBOutlet RandomNumberController *randomnumber;
- IBOutlet WebGamesController *webgames;
- IBOutlet CalculatorController *calculator;
- IBOutlet TipCalculatorController *tipcalculator;
- IBOutlet CurrencyController *currency;
- IBOutlet AlcoholCalculator *alcohol;
- IBOutlet BMICalculator * bmi;
- IBOutlet LoanCalculator * loan;
- IBOutlet HolidayController * holiday;
- IBOutlet TapCounterController * tapcounter;
- IBOutlet GoogleMailController * googlemail;
- IBOutlet GoogleLatitudeController * latitude;
- IBOutlet iGoogleController * igoogle;
- IBOutlet GoogleBuzzController * buzz;
- IBOutlet GoogleReaderController * reader;
- IBOutlet GoogleNewsController * news;
- IBOutlet GoogleDocsController * docs;
- IBOutlet GoogleCalController * googlecal;
- IBOutlet DecisionerController * decisioner;
- IBOutlet YahooController * yahoo;
- IBOutlet HotmailController * hotmail;
- IBOutlet FacebookController * facebook;
- IBOutlet TwitterController * twitter;
- IBOutlet EbayController * ebay;
- IBOutlet ReaderSample * readerSample;
- IBOutlet AltimeterController * altimeter;
- IBOutlet AppInfoController * appinfo;
- }
- @property (nonatomic, retain) UIView *scrollView;
- @property (nonatomic, retain) UIPageControl* pageControl;
- -(IBAction)pushClock;
- -(IBAction)pushFlashlight;
- -(IBAction)pushTranslator;
- -(IBAction)pushRandomNumber;
- -(IBAction)pushWebGames;
- -(IBAction)pushCalculator;
- -(IBAction)pushTipCalculator;
- -(IBAction)pushAlcoholCalculator;
- -(IBAction)pushBMI;
- -(IBAction)pushCurrency;
- -(IBAction)pushLoan;
- -(IBAction)pushHoliday;
- -(IBAction)pushTapCounter;
- -(IBAction)pushGoogleMail;
- -(IBAction)pushGoogleLatitude;
- -(IBAction)pushiGoogle;
- -(IBAction)pushGoogleBuzz;
- -(IBAction)pushGoogleReader;
- -(IBAction)pushGoogleNews;
- -(IBAction)pushGoogleDocs;
- -(IBAction)pushGoogleCal;
- -(IBAction)pushDecisioner;
- -(IBAction)pushFacebook;
- -(IBAction)pushTwitter;
- -(IBAction)pushAppInfo;
- -(IBAction)pushYahoo;
- -(IBAction)pushHotmail;
- -(IBAction)pushReader;
- -(IBAction)pushEbay;
- -(IBAction)pushAltimeter;
- - (void)setupPage;
- @end
- UtilitiesViewController.m:
- #import "UtilitiesViewController.h"
- #import "ClockController.h"
- #import "FlashlightController.h"
- #import "TranslatorController.h"
- #import "RandomNumberController.h"
- #import "WebGamesController.h"
- #import "CalculatorController.h"
- #import "TipCalculatorController.h"
- #import "CurrencyController.h"
- #import "AlcoholCalculator.h"
- #import "BMICalculator.h"
- #import "LoanCalculator.h"
- #import "HolidayController.h"
- #import "TapCounterController.h"
- #import "GoogleMailController.h"
- #import "GoogleLatitudeController.h"
- #import "iGoogleController.h"
- #import "GoogleBuzzController.h"
- #import "GoogleReaderController.h"
- #import "GoogleNewsController.h"
- #import "GoogleDocsController.h"
- #import "GoogleCalController.h"
- #import "DecisionerController.h"
- #import "YahooController.h"
- #import "HotmailController.h"
- #import "ReaderSample.h"
- #import "FacebookController.h"
- #import "TwitterController.h"
- #import "AltimeterController.h"
- #import "AppInfoController.h"
- #import "EbayController.h"
- @implementation UtilitiesViewController
- @synthesize pageControl;
- @synthesize scrollView;
- -(void)viewDidLoad {
- [scrollview setScrollEnabled:YES];
- [scrollview setContentSize:CGSizeMake(640, 300)];
- [super viewDidLoad];
- }
- - (void)setupPage
- {
- scrollview.delegate = self;
- [scrollview setCanCancelContentTouches:NO];
- scrollview.indicatorStyle = UIScrollViewIndicatorStyleWhite;
- scrollview.clipsToBounds = YES;
- scrollview.scrollEnabled = YES;
- scrollview.pagingEnabled = YES;
- NSUInteger nimages = 0;
- CGFloat cx = 0;
- for (; ; nimages++) {
- NSString *imageName = [NSString stringWithFormat:@"image%d.jpg", (nimages + 1)];
- UIImage *image = [UIImage imageNamed:imageName];
- if (image == nil) {
- break;
- }
- UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
- CGRect rect = imageView.frame;
- rect.size.height = image.size.height;
- rect.size.width = image.size.width;
- rect.origin.x = ((scrollview.frame.size.width - image.size.width) / 2) + cx;
- rect.origin.y = ((scrollview.frame.size.height - image.size.height) / 2);
- imageView.frame = rect;
- [scrollview addSubview:imageView];
- [imageView release];
- cx += scrollview.frame.size.width;
- }
- self.pageControl.numberOfPages = nimages;
- [scrollview setContentSize:CGSizeMake(cx, [scrollView bounds].size.height)];
- }
- #pragma mark -
- #pragma mark UIScrollViewDelegate stuff
- - (void)scrollViewDidScroll:(UIScrollView *)_scrollView
- {
- if (pageControlIsChangingPage) {
- return;
- }
- CGFloat pageWidth = _scrollView.frame.size.width;
- int page = floor((_scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
- pageControl.currentPage = page;
- }
- - (void)scrollViewDidEndDecelerating:(UIScrollView *)_scrollView
- {
- pageControlIsChangingPage = NO;
- }
- -(IBAction)pushClock {
- [self presentModalViewController: clock animated:YES];
- }
- -(IBAction)pushFlashlight {
- [self presentModalViewController: flashlight animated:YES];
- }
- -(IBAction)pushTranslator {
- [self presentModalViewController: translator animated:YES];
- }
- -(IBAction)pushRandomNumber {
- [self presentModalViewController: randomnumber animated:YES];
- }
- -(IBAction)pushWebGames {
- [self presentModalViewController: webgames animated:YES];
- }
- -(IBAction)pushCalculator {
- [self presentModalViewController: calculator animated:YES];
- }
- -(IBAction)pushTipCalculator {
- [self presentModalViewController: tipcalculator animated:YES];
- }
- -(IBAction)pushCurrency {
- [self presentModalViewController: currency animated:YES];
- }
- -(IBAction)pushAlcoholCalculator {
- [self presentModalViewController: alcohol animated:YES];
- }
- -(IBAction)pushBMI {
- [self presentModalViewController: bmi animated:YES];
- }
- -(IBAction)pushLoan {
- [self presentModalViewController: loan animated:YES];
- }
- -(IBAction)pushHoliday {
- [self presentModalViewController: holiday animated:YES];
- }
- -(IBAction)pushTapCounter {
- [self presentModalViewController: tapcounter animated:YES];
- }
- -(IBAction)pushGoogleMail {
- [self presentModalViewController: googlemail animated:YES];
- }
- -(IBAction)pushGoogleLatitude {
- [self presentModalViewController: latitude animated:YES];
- }
- -(IBAction)pushiGoogle {
- [self presentModalViewController: igoogle animated:YES];
- }
- -(IBAction)pushGoogleBuzz {
- [self presentModalViewController: buzz animated:YES];
- }
- -(IBAction)pushGoogleReader {
- [self presentModalViewController: reader animated:YES];
- }
- -(IBAction)pushGoogleNews {
- [self presentModalViewController: news animated:YES];
- }
- -(IBAction)pushGoogleDocs {
- [self presentModalViewController: docs animated:YES];
- }
- -(IBAction)pushGoogleCal {
- [self presentModalViewController: googlecal animated:YES];
- }
- -(IBAction)pushDecisioner {
- [self presentModalViewController:decisioner animated:YES];
- }
- -(IBAction)pushFacebook {
- [self presentModalViewController:facebook animated:YES];
- }
- -(IBAction)pushYahoo {
- [self presentModalViewController:yahoo animated:YES];
- }
- -(IBAction)pushHotmail {
- [self presentModalViewController:hotmail animated:YES];
- }
- -(IBAction)pushTwitter {
- [self presentModalViewController:twitter animated:YES];
- }
- -(IBAction)pushEbay {
- [self presentModalViewController:ebay animated:YES];
- }
- -(IBAction)pushReader {
- [self presentModalViewController:readerSample animated:YES];
- }
- -(IBAction)pushAltimeter {
- [self presentModalViewController:altimeter animated:YES];
- }
- -(IBAction)pushAppInfo {
- [self presentModalViewController:appinfo animated:YES];
- }
- @end
Vielen Dank im Vorraus,
Alex