iOS2012. 10. 18. 16:32

그냥 좀 간단한 list 같은 object 는 없나요?  tableview 가 생각보다 처음 쓰기에 복잡하네요.

지금 전 하나의 view 에 2가지 독립된 data 리스트를 보여주고 각각 입력하고 삭제하고 그런 일을 하려고 하는데요.
그래서 2개의 NSMutableArray를 만들어서 data 를 처리해서 첫번째 tableview 에는 잘 연결되서 제가 원하는 데로 작동합니다.
근데 두번째 tableview에는 연결하려고 하는데 잘 모르겠어요.

인터페이스로는 그냥 UIViewController 를 쓰고 있구요. UITableViewController 는 안씁니다.

어떻게 하는지 좀 구체적으로 설명해주면 저같이 얼마 안된 iphone 개발자에게 너무 도움이 많이 될꺼 같아요.

감사합니다.


자답: 
이런식으로 하니 되네요.

tableview 함수에 
if(tableviwe == myTable1){
  //처리
}else if(tableviwe == myTable1){
  //처리
}



Posted by 다오나무
iOS2012. 9. 18. 00:37

//경고창 1.

UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"A" message:@"" delegate:self cancelButtonTitle:@"확인" otherButtonTitles:@"취소"nil];

[alert show];

[alert release];


//경고창 2

UIAlertView *alert =[[UIAlertView alloc]initWithTitle:@"B" message:@"" delegate:self 

cancelButtonTitle:@"확인" otherButtonTitles:@"취소"nil];

[alert show];

[alert release];


//경고창 3

UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"C" message:@"" delegate:self 

cancelButtonTitle:@"확인" otherButtonTitles:@"취소"nil];

[alert show];

[alert release];



//경고창의 버튼 이벤트를 감지하는 델리게이트.

- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex

{

//경고창의 타이틀을 비교해서 경고창을 구별한다.

if ( [[alertView titleisEqualToString:@"A"])

{

        if(buttonIndex==0){

}else {

}

    

}

else if ( [[alertView titleisEqualToString:@"B"]) 

{

if(buttonIndex==0){

}

}

else if ( [[alertView titleisEqualToString:@"C"]) 

{

if(buttonIndex==0){

}

}

}

Posted by 다오나무
iOS2012. 9. 18. 00:24

http://www.iphonedevsdk.com/forum/iphone-sdk-development/61426-multiple-action-sheets-problem.html
UIActionSheet *actionSheet1;
UIActionSheet *actionSheet2;
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
if(actionSheet==actionSheet1)
{
do this}
else
if(actionSheet==actionSheet2)
{do that}
}

Posted by 다오나무