Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Error At ScrollView connect Delegate.

Hello.


Now, I develop one Application.

However, Don't solve this Error problem.


That is..


First, my code


- (id)init

{

self = [super init];

if (self) {

pageIndex = 0;

pageNum = 0;

[self.viewsetBackgroundColor:[[UIColoralloc] initWithRed:0.855green:0.855blue:0.855alpha:1.0]];

UIImage *img = [UIImage imageNamed:@"title_img.png"];

UIImageView *titleImg = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, img.size.width, img.size.height)]autorelease];

[titleImg setImage:img];

[self.view addSubview:titleImg];

UIImageView *contentBack = [[[UIImageView alloc] initWithFrame:CGRectMake(15.5, 80, 289.5, 269)]autorelease];

[contentBack setImage:[UIImage imageNamed:@"icon_bg.png"]];

[self.view addSubview:contentBack];

contentScroll = [[UIScrollViewalloc] initWithFrame:CGRectMake(0, 80, 320, 269)];

[contentScrollsetShowsVerticalScrollIndicator:NO];

[contentScrollsetShowsHorizontalScrollIndicator:NO];

contentScroll.pagingEnabled = YES;

[self initData];

[selfmakeContentView];

contentScroll.delegate = self;

[self.view addSubview:contentScroll];


}

returnself;

}


-(void)initData // 내용교체

{

contentInfo = [[NSArrayalloc] initWithObjects:@"icon_01.png",

@"icon_02.png",

@"icon_03.png",

~

@"icon_04.png",

nil];

}


-(void)makeContentView

{

// pageIndex = [contentInfo count]/9;

float l = 11.25;

float t = 11.33;

float w = 74;

float h = 67;

UIView *contentView;

int row = 0;

int column = 0;

for(int i = 0;i<[contentInfo count];i++)

{


if(row==0&&column==0)

{

pageNum++;

contentView = [[UIView alloc] initWithFrame:CGRectMake(320*(pageNum-1), 0, 320, 269)];

}


CGRect rect = CGRectMake(l*2.25+column*w+l*2*column, t+row*h+t*2*row, w, h);

NSLog(@"i:%d row:%d column:%d x:%f y:%f ",i,row,column,l+column*w+l*2*column,t+row*h+t*2*row);

[utility CreateButton:@"" type:UIButtonTypeCustom view:contentView frame:rect target:self Image:[UIImage imageNamed:[contentInfo objectAtIndex:i]] Action:nil];

if(column==2)

{

row++;

column = 0;

}

else{

column++;

}

if(row==3||i==[contentInfo count]-1)

{

row=0;

column = 0;

[contentScroll addSubview:contentView];

[contentView release];

}

}

[contentScrollsetContentSize:CGSizeMake(320*pageNum, 269)];

}


#pragma mark scrollView delegate

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {

}



Next, Occured Error.


2013-07-22 10:57:23.468 smartGolf[477:907] -[__NSCFString scrollViewDidScroll:]: unrecognized selector sent to instance 0x1e53f180

2013-07-22 10:57:23.471 smartGolf[477:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString scrollViewDidScroll:]: unrecognized selector sent to instance 0x1e53f180'

*** First throw call stack:

(0x33f3e3e7 0x3bc39963 0x33f41f31 0x33f4064d 0x33e98208 0x35d6f84b 0x35e89f6f 0x35e6ac61 0x35e323a1 0x3601f163 0x35d56883 0x35d552cd 0x35d601e7 0x35d5fdb3 0x35d4d8e1 0x35d4d1ef 0x37a655f7 0x37a65227 0x33f133e7 0x33f1338b 0x33f1220f 0x33e8523d 0x33e850c9 0x37a6433b 0x35da12b9 0xb57c7 0x3c066b20)

libc++abi.dylib: terminate called throwing an exception


I don't know this Error mean.

Please, help this Error.

iPhone 4S, iOS 6.1.4

Posted on Jul 21, 2013 7:10 PM

Reply

There are no replies.

Error At ScrollView connect Delegate.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.