Search Results

Search found 157 results on 7 pages for 'monotouch'.

Page 4/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Very simple test view in MonoTouch draws a line using Core Graphics but view content is not shown

    - by Krumelur
    Hi, I give up now on this very simple test I've been trying to run. I want to add a subview to my window which does nothing but draw a line from one corner of the iPhone's screen to the other and then, using touchesMoved() it is supposed to draw a line from the last to the current point. The issues: 1. Already the initial line is not visible. 2. When using Interface Builder, the initial line is visible, but drawRect() is never called, even if I call SetNeedsDisplay(). It can't be that hard...can somebody fix the code below to make it work? In main.cs in FinishedLaunching(): oView = new TestView(); oView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; oView.Frame = new System.Drawing.RectangleF(0, 0, 320, 480); window.AddSubview(oView); window.MakeKeyAndVisible (); The TestView.cs: using System; using MonoTouch.UIKit; using MonoTouch.CoreGraphics; using System.Drawing; using MonoTouch.CoreAnimation; using MonoTouch.Foundation; namespace Test { public class TestView : UIView { public TestView () : base() { } public override void DrawRect (RectangleF area, UIViewPrintFormatter formatter) { CGContext oContext = UIGraphics.GetCurrentContext(); oContext.SetStrokeColor(UIColor.Red.CGColor.Components); oContext.SetLineWidth(3.0f); this.oLastPoint.Y = UIScreen.MainScreen.ApplicationFrame.Size.Height - this.oLastPoint.Y; this.oCurrentPoint.Y = UIScreen.MainScreen.ApplicationFrame.Size.Height - this.oCurrentPoint.Y; oContext.StrokeLineSegments(new PointF[] {this.oLastPoint, this.oCurrentPoint }); oContext.Flush(); oContext.RestoreState(); Console.Out.WriteLine("Current X: {0}, Y: {1}", oCurrentPoint.X.ToString(), oCurrentPoint.Y.ToString()); Console.Out.WriteLine("Last X: {0}, Y: {1}", oLastPoint.X.ToString(), oLastPoint.Y.ToString()); } private PointF oCurrentPoint = new PointF(0, 0); private PointF oLastPoint = new PointF(320, 480); public override void TouchesMoved (MonoTouch.Foundation.NSSet touches, UIEvent evt) { base.TouchesMoved (touches, evt); UITouch oTouch = (UITouch)touches.AnyObject; this.oCurrentPoint = oTouch.LocationInView(this); this.oLastPoint = oTouch.PreviousLocationInView(this); this.SetNeedsDisplay(); } } }

    Read the article

  • Appcelerator Vs. MonoTouch - Which one is best for a .NET developer ?

    - by Click Ahead
    Hi All, I'm a .NET developer with 10 years experience developing Web & Mobile Apps. I'm looking to branch into iPhone (and possibly Android) development. I'm looking at two products: Appcelerator Titanium (http://www.appcelerator.com/) and MonoTouch (http://monotouch.net/) I like MonoTouch because of it's standing in the Mono development communitity and it's C#. In saying that Appcelerator looks very straight forward using HTML and Javascript and targets Android too (which is overtaking the iPhone). The apps I'm looking to develop are line of business applications with data entry, syncing with back office, etc. Can anyone give their opinion on the pro's / con's of using these tools or any experiences. I'm very interested in any thoughts ! Thanks in advance, Ciaran

    Read the article

  • Developer Developer Developer Scotland 2010

    - by Chris Hardy (ChrisNTR)
    This past weekend, I headed up to Glasgow thanks to Plip for driving and Dave Sussman for some light entertainment to do a session on C# on the iPhone with MonoTouch. I had already presented a session similar to this one at DDD8 in Reading, which you can watch on Vimeo ( http://vimeo.com/9150434 ) but in this session I covered more topics such as the new 3.3.1 section of the new terms of service Apple released. I also showed a Twitter example written in MonoTouch, which was reused from the DDD8 session...(read more)

    Read the article

  • MonoTouch supporte iOS 6, Xamarin sort la version 6 de son environnement de développement d'applications natives iOS en C#

    MonoTouch supporte iOS 6 Xamarin sort la version 6 de son environnement de développement d'applications natives iOS en C# Xamarin vient de publier une mise à jour de MonoTouch, son environnement de développement pour mobile multiplateforme. MonoTouch est un kit de développement logiciel qui permet de créer des applications mobiles natives pour iOS en utilisant le langage .NET C# sur le système d'exploitation Mac OS X. La même base de code C# utilisée pour créer des applications iOS avec MonoTouch peut également être utilisée avec la famille des outils Mono pour développer des applications Android et Windows Phone. La version 6 de MonoTouch apporte comme nouveauté pha...

    Read the article

  • MonoTouch's Soft Debugger don't connect to App on iPhone - why?

    - by smokinharp
    Hi everyone, I'm quite new on MonoTouch, so please forgive me my question in doubt... ;-) I need help with the soft-debugger, because it's not connecting to the App on the device. While with iPhone Simulator everything is working as expected, the following happens when I start debugging against my device: The is uploaded and installed to the device. MonoDevelop comes up with a window saying the following: "Waiting for debugger to connect on 127.0.0.1:10000..." Please start the application on the device" When starting the app on the device, the device vibrates indicating that the debugger is not connected.... In the settings of my App on the iPhone I have set the IP-Adress to my Mac's IP. My iPhone is connected via WIFI to my network. I can ping my Mac from my iPhone and vice versa. In several screenshots where the debugger was obviously working I saw that the debugger came up with the Mac's IP address and not the 127.0.0.1.... Do I have to configure my IP-address somewhere in MonoDevelop? BTW: I'm using the latest version of MonoDevelop - it's 2.4.1 I have tried anything.... re-installing MonoDevelop, cleaning up the project several times, setting up a new project.... nothing... Please, please help....

    Read the article

  • Choosing a crossplatform for mobile development

    - by Mech0z
    I am creating a enterprise project and will develop the app for WP, Android and IPhone (Maybe also tablets) I have then done some research of what solutions are out there and have narrowed my choice down to 3 platforms (Due to my requirement to work with Bluetooth) The biggest requirement other than Bluetooth is the need to create good interfaces and module programming so its easy to maintain the whole solution, other than that I would like to use C# but its not a real requirement, but if the difference between 2 platforms is very small then it might tip the scale. Mono (MonoTouch, Mono for android) PhoneGap RhoMobile From my understanding then PhoneGap is not suited for business apps and I am not entirely sure why, but it seems like a platform made for speed rather than long term developement, not sure how true this is. RhoMobile is made for enterprice and might suit my needs, but not sure if its a good platform Anyone with insight that care to share their opinion Mono is C#, seems to be very mature and I found MvvmCross which should help organize the project

    Read the article

  • Is it possible to change the default InputView in MonoTouch?

    - by Pwninstein
    I would like to display a different view than the standard keyboard (a picker control, or a date picker, for example) when a text field becomes first responder (i.e. gets focus). This would be really nice, because currently I'm pushing a custom view which contains my picker control onto the navigation stack where the user chooses an option, and then hits an OK or Cancel button. According to the documentation for UITextField.InputView: Assigning a custom view to this property causes that view to be presented instead. But, It's read only!!! Is there a workaround for this? Do I need to implement a custom UITextField control and somehow override the InputView property? Do I need to call some kind of native function? I'd really love not to have to do either of those things... but if I have to, so be it. Thanks in advance!

    Read the article

  • CLR Profiler Allocated Bytes and XNA ContentManager

    - by Vackup
    I've been fighting with XNA ContentManager and memory allocations for some weeks because I'm trying to port my game from XNA (Windows) to ExEn / Monotouch (iphone). The problem is that after playing a few levels, my game exits unexpectedly on a real iPhone device (not simulator). Profiling memory usage on Windows with CLRProfile, I found some useful stuff but I also found something I dont understand. If I use 2 ContentManagers (1 for shared assets and 1 for level assets), when profiling, "Allocated Bytes" grows and grows after level through level but Memory consumption measured by Windows Task Manager stays constant (down when I unload the content manager and up again when I load content). Obviously, I contentManager.Unload() when level ends. After a few levels my game exits unexpectedly on an iPhone device. If I use 1 content manager, "CRLProfiler Allocated Bytes" stays constant on Windows and on the iPhone; I can play the game normally and it doesnt exit unexpectedly. I use the same assets level through level. It seems like in ios (iPhone) when loading and unloading the same assets, it allocates memory and consumes all device memory, so the ios kill it. Can anybody explain me how this really works? I've read quite a bit, but I still don't understand what's going on.

    Read the article

  • How to use custom UITableViewCell from Interface Builder?

    - by Krumelur
    I want to be able to design my own UITableViewCell in IB. But I keep getting a null ref exception when trying to access the label I defined in IB. Here's what I'm doing: In Interface Builder: I removed the "View" and added a UITableViewCell instead. Changed the class of the UITableViewCell to "TestCellView". Added a UILabel to the cell. Added an outlet "oLblText" to TestCellView and connected the UILabel to it. Changed the identifier of the class to "TestCellView". Implement TestCellView.xib.cs public partial class TestCellView : UITableViewCell { public TestCellView(string sKey) : base(UITableViewCellStyle.Default, sKey) { } public TestCellView(IntPtr oHandle) : base(oHandle) { } public string TestText { get { return this.oLblText.Text; } set { // HERE I get the null ref exception! this.oLblText.Text = value; } } } ** The TestCellView.designer.cs** [MonoTouch.Foundation.Register("TestCellView")] public partial class TestCellView { private MonoTouch.UIKit.UILabel __mt_oLblText; #pragma warning disable 0169 [MonoTouch.Foundation.Connect("oLblText")] private MonoTouch.UIKit.UILabel oLblText { get { this.__mt_oLblText = ((MonoTouch.UIKit.UILabel)(this.GetNativeField("oLblText"))); return this.__mt_oLblText; } set { this.__mt_oLblText = value; this.SetNativeField("oLblText", value); } } } In my table's source: public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) { TestCellView oCell = (TestCellView)tableView.DequeueReusableCell("myCell"); if(oCell == null) { // I suppose this is wrong but how to do it correctly? // this == my UITableViewSource. NSBundle.MainBundle.LoadNib("TestCellView", this, null); oCell = new TestCellView("myCell"); } oCell.TestText = "Cell " + indexPath.Row; return oCell; } Please note that I do NOT want a solution that involves a UIViewController for every cell. I have seen a couple of examples on the web doing this. I just think it is total overkill. What am I doing wrong?

    Read the article

  • What's new in Xamarin and iOS7 - webinar

    - by Wallym
    I recently did an online webinar regarding the new iOS7 and Xamarin.  In it, I covered the basics of what is new in iOS7 along with what is new in Xamarin's developer platform.  Please take some time and view this webinar.  The items that were covered include:What's new in iOS7.The XCode Design Surface.An example showing new iOS7 View Animations.What's new with Xamarin and async, await, and HttpClient.A demo of Razor Templating.The Xamarin.iOS Plugin for Visual Studio.  ** The video only works in Windows.  I don't control the content, so I have to go with what I am given. :-( **

    Read the article

  • Async & Await in C# with Xamarin

    - by Wallym
     One of the great things about the .NET Framework is that Microsoft has worked long and hard to improve many features. Since the initial release of .NET 1.0, there has been support for threading via .NET threads as well as an application-level threadpool. This provided a great starting point when compared to Visual Basic 6 and classic ASP programming. The release of.NET 4 brought significant improvements in the area of threading, asynchronous operations and parallel operations. While the improvements made working with asynchronous operations easier, new problems were introduced, since many of these operations work based on callbacks. For example: How should a developer handle error checking? The program flow tends to be non-linear. Fixing bugs can be problematic. It is hard for a developer to get an understanding of what is happening within an application. The release of .NET 4.5 (and C# 5.0), in the fall of 2012, was a blockbuster update with regards to asynchronous operations and threads. Microsoft has added C# language keywords to take this non-linear callback-based program flow and turn it into a much more linear flow. Recently, Xamarin has updated Xamarin.Android and Xamarin.iOS to support async. This article will look at how Xamarin has implemented the .NET 4.5/C# 5 support into their Xamarin.iOS and Xamarin.Android productions. There are three general areas that I'll focus on: A general look at the asynchronous support in Xamarin's mobile products. This includes async, await, and the implications that this has for cross-platform code. The new HttpClient class that is provided in .NET 4.5/Mono 3.2. Xamarin's extensions for asynchronous operations for Android and iOS. FYI: Be aware that sometimes the OpenWeatherMap API breaks, for no reason.  I found this out after I shipped the article in.

    Read the article

  • Article - Create a MapView in Google Maps for iOS

    - by Wallym
    With the introduction of iOS 6 in September 2012, Apple Inc. removed the map system based on Google Maps and introduced its own map system for iPhone and iPad users. The introduction of Apple Maps, like any new technology, came with its own problems. In December 2012, Google released its Google Maps SDK for iOS. (Check the Google Maps SDK for iOS page for additional documentation as new features are deployed to the product.) Google Maps for iOS has a long, solid track record, given the use of its data in Android and many years of usage. The introduction of Google Maps for iOS has resulted in a measurable increase in the number of users who have updated their existing iPhones from iOS version 5 to iOS version 6. This article will look at using Google Maps for iOS using Xamarin.iOS.Article url: http://visualstudiomagazine.com/articles/2013/06/01/how-to-use-google-maps-for-ios.asp

    Read the article

  • Draw a never-ending line in XNA

    - by user2236165
    I am drawing a line in XNA which I want to never end. I also have a tool that moves forward in X-direction and a camera which is centered at this tool. However, when I reach the end of the viewport the lines are not drawn anymore. Here are some pictures to illustrate my problem: At the start the line goes across the whole screen, but as my tool moves forward, we reach the end of the line. Here are the method which draws the lines: private void DrawEvenlySpacedSprites (Texture2D texture, Vector2 point1, Vector2 point2, float increment) { var distance = Vector2.Distance (point1, point2); // the distance between two points var iterations = (int)(distance / increment); // how many sprites with be drawn var normalizedIncrement = 1.0f / iterations; // the Lerp method needs values between 0.0 and 1.0 var amount = 0.0f; if (iterations == 0) iterations = 1; for (int i = 0; i < iterations; i++) { var drawPoint = Vector2.Lerp (point1, point2, amount); spriteBatch.Draw (texture, drawPoint, Color.White); amount += normalizedIncrement; } } Here are the draw method in Game. The dots are my lines: protected override void Draw (GameTime gameTime) { graphics.GraphicsDevice.Clear(Color.Black); nyVector = nextVector (gammelVector); GraphicsDevice.SetRenderTarget (renderTarget); spriteBatch.Begin (); DrawEvenlySpacedSprites (dot, gammelVector, nyVector, 0.9F); spriteBatch.End (); GraphicsDevice.SetRenderTarget (null); spriteBatch.Begin (SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, camera.transform); spriteBatch.Draw (renderTarget, new Vector2 (), Color.White); spriteBatch.Draw (tool, new Vector2(toolPos.X - (tool.Width/2), toolPos.Y - (tool.Height/2)), Color.White); spriteBatch.End (); gammelVector = new Vector2 (nyVector.X, nyVector.Y); base.Draw (gameTime); } Here's the next vector-method, It just finds me a new point where the line should be drawn with a new X-coordinate between 100 and 200 pixels and a random Y-coordinate between the old vector Y-coordinate and the height of the viewport: Vector2 nextVector (Vector2 vector) { return new Vector2 (vector.X + r.Next(100, 200), r.Next ((int)(vector.Y - 100), viewport.Height)); } Can anyone point me in the right direction here? I'm guessing it has to do with the viewport.width, but I'm not quite sure how to solve it. Thank you for reading!

    Read the article

  • How do I reconfigure my GLES frame buffer after a rotation?

    - by Panda Pajama
    I am implementing interface rotation for my GLES based game for iOS, written in Xamarin.iOS with OpenTK. I am detecting the rotation by overriding WillRotate, in my UIViewController, and I correctly re-setup all of my projection matrices. However, when drawing a sprite, the image looks a bit blurrier on the landscape version compared to the portrait version, as you can see in the following closeups magnified 10x. Portrait (before rotating) Landscape (after rotating) In both cases, I'm using the same texture with the same sampler, the same shader, and the same GL state. I just changed the order of the parameters in the projection matrix, so the resulting sizes should be exactly the same pixelwise. Since this could be thought of as a window resize, I suppose that the framebuffer has to be recreated to the new size. When working on desktop apps on Direct3D11 (SharpDX), I would have to call swapChain.ResizeBuffers() to do this. I have tried setting AutoResize = true in my iPhoneOSGameView, but then the framebuffer gets clipped as I rotate the interface, and then everything disappears when rotating the interface again. I'm not doing anything strange, my framebuffer initialization is pretty vanilla: int scaling = (int)UIScreen.MainScreen.Scale; DeviceWidth = (int)UIScreen.MainScreen.Bounds.Width * scaling; DeviceHeight = (int)UIScreen.MainScreen.Bounds.Height * scaling; Size = new System.Drawing.Size((int)(DeviceWidth), (int)(DeviceHeight)); Bounds = new System.Drawing.RectangleF(0, 0, DeviceWidth, DeviceHeight); Frame = new System.Drawing.RectangleF(0, 0, DeviceWidth, DeviceHeight); ContextRenderingApi = EAGLRenderingAPI.OpenGLES2; AutoResize = true; LayerRetainsBacking = true; LayerColorFormat = EAGLColorFormat.RGBA8; I get inconsistent results when changing Size, Bounds and Frame on my CreateFrameBuffer override, but since the documentation is so incomplete (it has nothing on Bounds and Frame), I have resorted to randomly changing stuff here and there without really knowing what is going on. There is a similar question which has no answers. However, I don't know if they're experiencing the same problem as I am. Is my supposition that recreating the framebuffer is necessary, correct? If so, does anybody know how to do it correctly in OpenTK for Xamarin.iOS?

    Read the article

  • Interesting links week #1

    - by erwin21
    Below a list of interesting links that I found this week: Frontend: 10 Tips for Optimizing Web Form Submission Usability 10 Valuable Tips and Tricks for Designing HTML Emails 8 useful sites for web developers Development: Mono for Android Other: 7 Exciting Web Development Trends for 2011 Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    Read the article

  • NDC 2011!

    - by Chris Hardy (ChrisNTR)
    I'm luckily getting the opportunity to speak at NDC 2011 this year. Last year was a blast and I'm sure 2011 is going to be no different. I'm going to be speaking on the second day ( Thursday June 9th ) and I'll be joined in track four with some other awesome mobile guys too! At the moment, the whole agenda hasn't been confirmed and I guess is still likely to change so make sure you keep on checking for new speakers. Don't forget that Scott Guthrie is keynoting the whole conference! I'm going to be...(read more)

    Read the article

  • Efficient way of detecting a touched object in a game?

    - by Pin
    Imagine a Sims-like 2D game for a touch based mobile phone where one can interact with virtually any object in the scene. How can I efficiently detect which object is being touched by the player? In my short experience, looping through all the visible objects in the scene and checking if they're touched has so far done the job, but when there may be many many moving objects in the screen that sounds kind of inefficient isn't it? Keeping the visible moving objects list can consume time in itself as one may have to loop through all of them each frame. Other solutions I've thought are: Spatial hashing. Divide the screen as a grid and place the visible objects in the corresponding bucket. Detection of the clicked object is fast but there's additional overhead for placing the objects in the correct bucket each frame. Maintaining a quad-tree. Moving objects have to be rearranged all the time, the previous solution looks better. What is usually done in this case?

    Read the article

  • Is there an easy and automatic way of converting a Windows XNA project into a Monotouch Monogame project?

    - by Krumelur
    I have just started with XNA development on Windows. But as I'm a fan of iOS I had to try porting my test code over to Monotouch on the Mac. I used these instructions: http://www.facepuncher.com/blogs/10parameters/?p=42 But this is so much (manual) work! And it really doesn't answer open topics like: why would I copy all the XNB files and in addition all the resources, like PNGs? Is there maybe a tool that automatically converts a Windows XNA project into a Monotouch iOS project or at least creates the correct folder structure?

    Read the article

  • Compile C# into objective-C

    - by Ali Shafai
    Now that monotouch is being banned, I was wondering if there is a way to translate C# (or some other modern language for that matter) into objective-C? I won't mind using apple's api as long as I don't have to declare my variables in 3-4 stages (ivar-property-synthesize-dealloc). All I want is a less wordy language to concentrate on my intent and not on the compiler syntax. unfortunately apple in its arrogance thinks objective-c is a "modern" language and if you are looking for an alternative (monotouch) it's because you are incapable of coding. also if you don't find programming in itunes; sorry, xcode enjoyable, it is not because there are better alternatives, it's because you are stupid. anyway back to my original question: can it be done?

    Read the article

  • Resize UITableViewCell to show image at maximum size

    - by Mike
    I want to show some images and text in a UITableView. But when I add the image to its UITableViewCell it breaks the layout and overlaps with the next Header. How can I set the size of the cell containing the image, so that the layout doesn't get broken? I found some ObjC-Code which suggest this can be done by using heightForRowAtIndexPath, but I couldn't find anything MonoTouch specific.

    Read the article

  • Valid URL-string as NSUrl becomes null

    - by Mike
    Hello, another issue where I seem to have found an solution for ObjC but not MonoTouch. I want a NSUrl from an URL (as string). The string may contain whitespace and backslashes. Why is NSUrl returning null for such string, even though these are valid urls in a browser? For example: NSUrl foo = NSUrl.FromString(@"http://google.com/search?\query"); foo == null Any suggestions?

    Read the article

  • Setting Twitter and Facebook statuses

    - by Chris S
    Are there any C# libraries for integrating Facebook status updates and twitter updates (preferably with url shortening) in Monotouch without too much heavy lifting? I know there is a Facebook kit already for objective-C, I really only need status updating however.

    Read the article

  • Twitter and Facebook status in

    - by Chris S
    Are there any C# libraries for integrating Facebook status updates and twitter updates (preferably with url shortening) in Monotouch without too much heavy lifting? I know there is a Facebook kit already for objective-C, I really only need status updating however.

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >