This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
public class MyDatasource : UITableViewDataSource | |
{ | |
object[] dataArray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PolygonOverlay : MKPolygonView{ | |
private MKPolygon _polygon; | |
public PolygonOverlay(MKPolygon polygon) | |
{ | |
_polygon = polygon; | |
} | |
public CGPath polyPath(MKPolygon polygon) | |
{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Register("RotatingViewController")] | |
public partial class RotatingViewController : UIViewController | |
{ | |
public UIViewController LandscapeLeftViewController {get;set;} | |
public UIViewController LandscapeRightViewController {get;set;} | |
public UIViewController PortraitViewController {get;set;} | |
private NSObject notificationObserver; | |
public RotatingViewController (IntPtr handle) : base(handle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class AppDelegate : UIApplicationDelegate | |
{ | |
CLLocationManager _iPhoneLocationManager = null; | |
LocationDelegate _locationDelegate = null; | |
// This method is invoked when the application has loaded its UI and its ready to run | |
public override bool FinishedLaunching (UIApplication app, NSDictionary options) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ScrollViewWithHeader : UIView | |
{ | |
private UIView _content; | |
private UIScrollView _header; | |
private UIView _headerContent; | |
private MyScrollViewDelegate _headerDelegate; | |
private RectangleF _headerFrame; | |
private UIScrollView _mainContent; | |
private MyScrollViewDelegate _mainContentDelegate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static UIImage AdjustImage(RectangleF rect,UIImage template, CGBlendMode mode,float red,float green,float blue,float alpha ) | |
{ | |
using (var cs = CGColorSpace.CreateDeviceRGB ()){ | |
using (var context = new CGBitmapContext (IntPtr.Zero, (int)rect.Width, (int)rect.Height, 8, (int)rect.Height*4, cs, CGImageAlphaInfo.PremultipliedLast)){ | |
context.TranslateCTM(0.0f,0f); | |
//context.ScaleCTM(1.0f,-1.0f); | |
context.DrawImage(rect,template.CGImage); | |
context.SetBlendMode(mode); | |
context.ClipToMask(rect,template.CGImage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
// example | |
MyMoviePlayer movieView = new MyMoviePlayer(window.Bounds) { MovieUrl = new NSUrl("http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8")}; | |
movieView.Play(); | |
movieView.Done += delegate{ | |
movieView.RemoveFromSuperview(); | |
} | |
window.AddSubview (movieView); | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// this is the first pass/untested translation of the code used in the store kit from this tutorial http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/ | |
using System; | |
using MonoTouch.StoreKit; | |
using MonoTouch.Foundation; | |
using System.Globalization; | |
using System.Threading; | |
namespace StoreKitExample | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Threading; | |
using MonoTouch.Foundation; | |
using System.IO; | |
using MonoTouch.UIKit; | |
/// <summary> | |
/// Static downloader class. | |
/// This class will download files one at a time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using MonoMac.Foundation; | |
using MonoMac.AppKit; | |
using MonoMac.ObjCRuntime; | |
namespace BundlerCrash | |
{ | |
public partial class AppDelegate : NSApplicationDelegate | |
{ |
OlderNewer