in Education by
I have a single view in my application which does not receive any events from iOS. I tried to call "BecomeFirstResponder" but this does not work and the method returns false. Here is the code which creates the view: _Window = new UIWindow(UIScreen.MainScreen.Bounds); View = new ApplicationView(this); _Window.RootViewController = new UIViewController(); _Window.Add(View); _Window.MakeKeyAndVisible(); Thats the code which handles the input( ApplicationView; Base class is iPhoneOSGameView which has UIView as base class ): public override void TouchesBegan(NSSet touches, UIEvent evt) { foreach (UITouch item in touches.ToArray()) { _Stage.MapTouchesBegan(new TouchEvent((Int32)item.Handle, item.LocationInView(this))); } } The method is never called. Thanks in advance JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Your code looks wrong. The UIViewController assigned to root does nothing. Also I think you meant to use window.AddSubview(). Does the code above even build? Does your view fill the entire screen? It only will receive touches inside its frame. You might want to take a look at the basics of the model view controller concept (http://developer.apple.com/library/mac/ipad/#documentation/General/Conceptual/DevPedia-CocoaCore/MVC.html) and also at some samples that get you started with iOS development in Monotouch (https://github.com/xamarin/monotouch-samples)

Related questions

0 votes
    I have to download images to my iOS apps local file system and read them back. On my simulator I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 6, 2022 in Education by JackTerrance
0 votes
    I replaced the Google Analytics SDK with the Firebase SDK. I'm looking to generate some of the previously- ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 19, 2022 in Education by JackTerrance
0 votes
    I have a table of items with a checkmark disclosure button, and I want to create a second table ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Aug 1, 2022 in Education by JackTerrance
0 votes
    I am facing a problem that makes me to waste a lot of time. Each time I insert an element on a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    I am trying to upload image by converting image to base64 format. And i am getting below error. Error ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    I am facing a problem that makes me to waste a lot of time. Each time I insert an element on a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 10, 2022 in Education by JackTerrance
0 votes
    I am trying to get a thumbnail image from a video from a URL using AVFoundation but I am getting ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
0 votes
    in Obj-C it was possible to iterate through alphabet with: for (char x='A'; x...
asked Apr 9, 2022 in Education by JackTerrance
0 votes
    i am new to iphone app development.i am trying to connect facebook using the facebook api's using iphone ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    What is responder chain in Objective-C?...
asked Nov 10, 2020 in Technology by JackTerrance
0 votes
    I am adding an background image to the Splash screen, but is not rendering the image. Sometime it load ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I am getting memory leak during migration using Realm (v1.0.2). My code looks like that: let ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    Want to build a debug tool to monitor the app, pause execution when bad things occur. Dev can continue ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    I currently have a UIView, call it (A), that is outsourced out into a 3rd party library. Pressing ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    Want to build a debug tool to monitor the app, pause execution when bad things occur. Dev can continue ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
...