- Navigation Stack์ Push๋ ๋ทฐ ์ปจํธ๋กค๋ฌ์ธ๊ฐ
- ๋ชจ๋ฌ ํ์์ผ๋ก Present๋ ๋ทฐ ์ปจํธ๋กค๋ฌ์ธ๊ฐ
์ด ๋๊ฐ์ง์ผ ๋ ๊ฐ์ฅ ๋ง์ง๋ง์ push๋ ๋ทฐ๋ฅผ ์ ๊ฑฐํ ๋ฐฉ๋ฒ์ด ๊ณ ๋ฏผ์ด ๋์ด ์ ๋ฆฌ๋ฅผ ํ๊ฒ ๋์๋ค.
๋ชจ๋ฌ ํ์์ด๋ฉด
[self dismissViewControllerAnimated:YES completion:nil];
๋ค๋น๊ฒ์ด์ ์คํ์ ํธ์๋ ํ์์ด๋ฉด
[self.navigationController popViewControllerAnimated:YES];
์๋ ์ฝ๋๋ ํ์ฌ ๋ทฐ๊ฐ ๋ชจ๋ฌ ํ์์ธ์ง ์๋์ง๋ฅผ ์ฒดํฌํ๋ ๋ก์ง์ด๋ค.
- (BOOL)isModal {
if([self presentingViewController])
return YES;
if([[[self navigationController] presentingViewController] presentedViewController] == [self navigationController])
return YES;
if([[[self tabBarController] presentingViewController] isKindOfClass:[UITabBarController class]])
return YES;
return NO;
}
// ์ถ์ฒ: https://you9010.tistory.com/138 [๋ณธ์ง์ ์ค์์ฑ]
'iOS > Objective-C' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[iOS/Objective-C] expected identifier or '(โ ์ค๋ฅ (0) | 2022.02.10 |
---|---|
[iOS/Objective-C] NSData์ NSString ํ๋ณํํ๊ธฐ (0) | 2022.02.03 |
[iOS/Objective-C] JSON Parsing (0) | 2022.02.03 |