У меня есть UISegmentedControl и всякий раз, когда я касаюсь кнопки, он должен показывать предупреждение с индексом выбранного в данный момент сегмента:
- (IBAction)bOkayTouched:(id)sender
{
NSString *msg = [NSString stringWithFormat:@"%@", [scRPSSL selectedSegmentIndex]];
UIAlertView *lol = [[UIAlertView alloc] initWithTitle:@"Mkay" message:msg delegate:self cancelButtonTitle:@"Okay" otherButtonTitles:nil];
[lol show];
[lol release];
}
Однако приложение вылетает, когда оно должно создать строку NSString. Но он не падает, когда я заменяю эту строку на:
NSString *msg = [NSString stringWithFormat:@"XD"];
или аналогичный.
О, и вот что говорит мне отладчик:
[Session started at 2009-08-30 21:04:38 +0200.]
[Session started at 2009-08-30 21:04:43 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 4630.
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
(gdb)
Кто-нибудь может мне помочь?
Кроме того, в предупреждении говорится «(ноль)», если выбранный индекс равен 0 (ноль).
Спасибо!