App stürzt plötzlich ab!!!

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • App stürzt plötzlich ab!!!

    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:

    Quellcode

    1. #import
    2. @class ClockController;
    3. @class FlashlightController;
    4. @class TranslatorController;
    5. @class RandomNumberController;
    6. @class WebGamesController;
    7. @class CalculatorController;
    8. @class TipCalculatorController;
    9. @class CurrencyController;
    10. @class AlcoholCalculator;
    11. @class BMICalculator;
    12. @class LoanCalculator;
    13. @class HolidayController;
    14. @class TapCounterController;
    15. @class GoogleMailController;
    16. @class GoogleLatitudeController;
    17. @class iGoogleController;
    18. @class GoogleBuzzController;
    19. @class GoogleReaderController;
    20. @class GoogleNewsController;
    21. @class GoogleDocsController;
    22. @class GoogleCalController;
    23. @class FacebookController;
    24. @class AppInfoController;
    25. @class YahooController;
    26. @class HotmailController;
    27. @class TwitterController;
    28. @class DecisionerController;
    29. @class ReaderSample;
    30. @class AltimeterController;
    31. @class EbayController;
    32. @interface UtilitiesViewController : UIViewController
    33. {
    34. IBOutlet UIScrollView * scrollview;
    35. IBOutlet UIPageControl* pageControl;
    36. BOOL pageControlIsChangingPage;
    37. IBOutlet ClockController *clock;
    38. IBOutlet FlashlightController *flashlight;
    39. IBOutlet TranslatorController *translator;
    40. IBOutlet RandomNumberController *randomnumber;
    41. IBOutlet WebGamesController *webgames;
    42. IBOutlet CalculatorController *calculator;
    43. IBOutlet TipCalculatorController *tipcalculator;
    44. IBOutlet CurrencyController *currency;
    45. IBOutlet AlcoholCalculator *alcohol;
    46. IBOutlet BMICalculator * bmi;
    47. IBOutlet LoanCalculator * loan;
    48. IBOutlet HolidayController * holiday;
    49. IBOutlet TapCounterController * tapcounter;
    50. IBOutlet GoogleMailController * googlemail;
    51. IBOutlet GoogleLatitudeController * latitude;
    52. IBOutlet iGoogleController * igoogle;
    53. IBOutlet GoogleBuzzController * buzz;
    54. IBOutlet GoogleReaderController * reader;
    55. IBOutlet GoogleNewsController * news;
    56. IBOutlet GoogleDocsController * docs;
    57. IBOutlet GoogleCalController * googlecal;
    58. IBOutlet DecisionerController * decisioner;
    59. IBOutlet YahooController * yahoo;
    60. IBOutlet HotmailController * hotmail;
    61. IBOutlet FacebookController * facebook;
    62. IBOutlet TwitterController * twitter;
    63. IBOutlet EbayController * ebay;
    64. IBOutlet ReaderSample * readerSample;
    65. IBOutlet AltimeterController * altimeter;
    66. IBOutlet AppInfoController * appinfo;
    67. }
    68. @property (nonatomic, retain) UIView *scrollView;
    69. @property (nonatomic, retain) UIPageControl* pageControl;
    70. -(IBAction)pushClock;
    71. -(IBAction)pushFlashlight;
    72. -(IBAction)pushTranslator;
    73. -(IBAction)pushRandomNumber;
    74. -(IBAction)pushWebGames;
    75. -(IBAction)pushCalculator;
    76. -(IBAction)pushTipCalculator;
    77. -(IBAction)pushAlcoholCalculator;
    78. -(IBAction)pushBMI;
    79. -(IBAction)pushCurrency;
    80. -(IBAction)pushLoan;
    81. -(IBAction)pushHoliday;
    82. -(IBAction)pushTapCounter;
    83. -(IBAction)pushGoogleMail;
    84. -(IBAction)pushGoogleLatitude;
    85. -(IBAction)pushiGoogle;
    86. -(IBAction)pushGoogleBuzz;
    87. -(IBAction)pushGoogleReader;
    88. -(IBAction)pushGoogleNews;
    89. -(IBAction)pushGoogleDocs;
    90. -(IBAction)pushGoogleCal;
    91. -(IBAction)pushDecisioner;
    92. -(IBAction)pushFacebook;
    93. -(IBAction)pushTwitter;
    94. -(IBAction)pushAppInfo;
    95. -(IBAction)pushYahoo;
    96. -(IBAction)pushHotmail;
    97. -(IBAction)pushReader;
    98. -(IBAction)pushEbay;
    99. -(IBAction)pushAltimeter;
    100. - (void)setupPage;
    101. @end
    102. UtilitiesViewController.m:
    103. #import "UtilitiesViewController.h"
    104. #import "ClockController.h"
    105. #import "FlashlightController.h"
    106. #import "TranslatorController.h"
    107. #import "RandomNumberController.h"
    108. #import "WebGamesController.h"
    109. #import "CalculatorController.h"
    110. #import "TipCalculatorController.h"
    111. #import "CurrencyController.h"
    112. #import "AlcoholCalculator.h"
    113. #import "BMICalculator.h"
    114. #import "LoanCalculator.h"
    115. #import "HolidayController.h"
    116. #import "TapCounterController.h"
    117. #import "GoogleMailController.h"
    118. #import "GoogleLatitudeController.h"
    119. #import "iGoogleController.h"
    120. #import "GoogleBuzzController.h"
    121. #import "GoogleReaderController.h"
    122. #import "GoogleNewsController.h"
    123. #import "GoogleDocsController.h"
    124. #import "GoogleCalController.h"
    125. #import "DecisionerController.h"
    126. #import "YahooController.h"
    127. #import "HotmailController.h"
    128. #import "ReaderSample.h"
    129. #import "FacebookController.h"
    130. #import "TwitterController.h"
    131. #import "AltimeterController.h"
    132. #import "AppInfoController.h"
    133. #import "EbayController.h"
    134. @implementation UtilitiesViewController
    135. @synthesize pageControl;
    136. @synthesize scrollView;
    137. -(void)viewDidLoad {
    138. [scrollview setScrollEnabled:YES];
    139. [scrollview setContentSize:CGSizeMake(640, 300)];
    140. [super viewDidLoad];
    141. }
    142. - (void)setupPage
    143. {
    144. scrollview.delegate = self;
    145. [scrollview setCanCancelContentTouches:NO];
    146. scrollview.indicatorStyle = UIScrollViewIndicatorStyleWhite;
    147. scrollview.clipsToBounds = YES;
    148. scrollview.scrollEnabled = YES;
    149. scrollview.pagingEnabled = YES;
    150. NSUInteger nimages = 0;
    151. CGFloat cx = 0;
    152. for (; ; nimages++) {
    153. NSString *imageName = [NSString stringWithFormat:@"image%d.jpg", (nimages + 1)];
    154. UIImage *image = [UIImage imageNamed:imageName];
    155. if (image == nil) {
    156. break;
    157. }
    158. UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
    159. CGRect rect = imageView.frame;
    160. rect.size.height = image.size.height;
    161. rect.size.width = image.size.width;
    162. rect.origin.x = ((scrollview.frame.size.width - image.size.width) / 2) + cx;
    163. rect.origin.y = ((scrollview.frame.size.height - image.size.height) / 2);
    164. imageView.frame = rect;
    165. [scrollview addSubview:imageView];
    166. [imageView release];
    167. cx += scrollview.frame.size.width;
    168. }
    169. self.pageControl.numberOfPages = nimages;
    170. [scrollview setContentSize:CGSizeMake(cx, [scrollView bounds].size.height)];
    171. }
    172. #pragma mark -
    173. #pragma mark UIScrollViewDelegate stuff
    174. - (void)scrollViewDidScroll:(UIScrollView *)_scrollView
    175. {
    176. if (pageControlIsChangingPage) {
    177. return;
    178. }
    179. CGFloat pageWidth = _scrollView.frame.size.width;
    180. int page = floor((_scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
    181. pageControl.currentPage = page;
    182. }
    183. - (void)scrollViewDidEndDecelerating:(UIScrollView *)_scrollView
    184. {
    185. pageControlIsChangingPage = NO;
    186. }
    187. -(IBAction)pushClock {
    188. [self presentModalViewController: clock animated:YES];
    189. }
    190. -(IBAction)pushFlashlight {
    191. [self presentModalViewController: flashlight animated:YES];
    192. }
    193. -(IBAction)pushTranslator {
    194. [self presentModalViewController: translator animated:YES];
    195. }
    196. -(IBAction)pushRandomNumber {
    197. [self presentModalViewController: randomnumber animated:YES];
    198. }
    199. -(IBAction)pushWebGames {
    200. [self presentModalViewController: webgames animated:YES];
    201. }
    202. -(IBAction)pushCalculator {
    203. [self presentModalViewController: calculator animated:YES];
    204. }
    205. -(IBAction)pushTipCalculator {
    206. [self presentModalViewController: tipcalculator animated:YES];
    207. }
    208. -(IBAction)pushCurrency {
    209. [self presentModalViewController: currency animated:YES];
    210. }
    211. -(IBAction)pushAlcoholCalculator {
    212. [self presentModalViewController: alcohol animated:YES];
    213. }
    214. -(IBAction)pushBMI {
    215. [self presentModalViewController: bmi animated:YES];
    216. }
    217. -(IBAction)pushLoan {
    218. [self presentModalViewController: loan animated:YES];
    219. }
    220. -(IBAction)pushHoliday {
    221. [self presentModalViewController: holiday animated:YES];
    222. }
    223. -(IBAction)pushTapCounter {
    224. [self presentModalViewController: tapcounter animated:YES];
    225. }
    226. -(IBAction)pushGoogleMail {
    227. [self presentModalViewController: googlemail animated:YES];
    228. }
    229. -(IBAction)pushGoogleLatitude {
    230. [self presentModalViewController: latitude animated:YES];
    231. }
    232. -(IBAction)pushiGoogle {
    233. [self presentModalViewController: igoogle animated:YES];
    234. }
    235. -(IBAction)pushGoogleBuzz {
    236. [self presentModalViewController: buzz animated:YES];
    237. }
    238. -(IBAction)pushGoogleReader {
    239. [self presentModalViewController: reader animated:YES];
    240. }
    241. -(IBAction)pushGoogleNews {
    242. [self presentModalViewController: news animated:YES];
    243. }
    244. -(IBAction)pushGoogleDocs {
    245. [self presentModalViewController: docs animated:YES];
    246. }
    247. -(IBAction)pushGoogleCal {
    248. [self presentModalViewController: googlecal animated:YES];
    249. }
    250. -(IBAction)pushDecisioner {
    251. [self presentModalViewController:decisioner animated:YES];
    252. }
    253. -(IBAction)pushFacebook {
    254. [self presentModalViewController:facebook animated:YES];
    255. }
    256. -(IBAction)pushYahoo {
    257. [self presentModalViewController:yahoo animated:YES];
    258. }
    259. -(IBAction)pushHotmail {
    260. [self presentModalViewController:hotmail animated:YES];
    261. }
    262. -(IBAction)pushTwitter {
    263. [self presentModalViewController:twitter animated:YES];
    264. }
    265. -(IBAction)pushEbay {
    266. [self presentModalViewController:ebay animated:YES];
    267. }
    268. -(IBAction)pushReader {
    269. [self presentModalViewController:readerSample animated:YES];
    270. }
    271. -(IBAction)pushAltimeter {
    272. [self presentModalViewController:altimeter animated:YES];
    273. }
    274. -(IBAction)pushAppInfo {
    275. [self presentModalViewController:appinfo animated:YES];
    276. }
    277. @end
    Alles anzeigen


    Vielen Dank im Vorraus,
    Alex