첫 번째 프로젝트에서 저는 UIButton
입니다. 내가 만질 때 다른 프로젝트의 다른 UIViewController
이 열리게 될 것입니다. 하지만 문제가있다 :ViewController를 다른 프로젝트에서 푸시하는 중 오류가 발생했습니다.
여기가 내가 다른 프로젝트
public partial class SomeSoluctionViewController : UIViewController
{
public SomeSoluctionViewController (IntPtr handle) : base (handle)
{
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
PushedClassController pushedclass = PushedClass.AppDelegate.Storyboard.InstantiateViewController ("PushedClass") as PushedClassController;
CallButton.TouchUpInside += (object sender, EventArgs e) => {
this.NavigationController.PushViewController (pushedclass, true);
};
// Perform any additional setup after loading the view, typically from a nib.
}
}
나는 자 마린의 사이트로과 pushViewController를 사용에서 다른 UIViewcontroller
를 호출하는 데 사용됩니다, 첫 번째 프로젝트에 내 코드를
지시 나는 식별자로 두 번째 클래스를 instanciate. PushedClassController의 AppDelegate에에
는 :
public static UIStoryboard Storyboard = UIStoryboard.FromName ("MainStoryboard", null);
나는 위의 그것을 사용할 수 있습니다. 목표 - C 예외 발생 : 로그는 "PushedClass"
와
namespace PushedClass
{
** [Register ("PushedClass")]**
public partial class PushedClassController : UIViewController
{
public PushedClassController (IntPtr handle) : base (handle)
{
}
}
}
Registred :
여기 두 번째 프로젝트에서 pushedView입니다. 이름 : NSInvalidArgumentException 이유 : Storyboard()에 'PushedClass'식별자가있는보기 컨트롤러가 없습니다.
작동하지 않았습니다! 그것은 동일합니다... –