This file contains hidden or 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
NSUrl url = new NSUrl (UPLOAD_LOCATION); | |
NSMutableUrlRequest request = new NSMutableUrlRequest (url); | |
request.HttpMethod = "POST"; | |
{ | |
// Unfortunately set_HTTPBodyStream isn't implemented in monotouch yet | |
Selector s = new Selector("setHTTPBodyStream:"); | |
NSInputStream stream = new NSInputStream (random_file_path); | |
Messaging.void_objc_msgSend_IntPtr (request.Handle, s.Handle, stream.Handle); |
This file contains hidden or 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 MonoTouch.UIKit; | |
using System.Drawing; | |
using MonoTouch.AudioToolbox; | |
using MonoTouch.CoreGraphics; | |
namespace GoogleMusic | |
{ | |
public class LevelMeter : UIView | |
{ |
This file contains hidden or 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
float pageControlHeight = 18.0f; | |
UIScrollView scrollView; | |
UIPageControl pageControl; | |
public void BuildAndReloadUI(List<Marker> markers, int favCount) | |
{ | |
Util.TurnOffNetworkActivity(); | |
CleanView(); |
This file contains hidden or 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
// no claim or warranty is made on this code | |
// it is very brute force | |
using System; | |
using System.Collections; | |
using System.IO; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Collections.Generic; |
This file contains hidden or 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
//most of the non-declared variables here are at the class level - eg window is: | |
// UIWindow window | |
// etc. | |
window = new UIWindow (UIScreen.MainScreen.Bounds); | |
UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackOpaque; | |
This file contains hidden or 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 BTPinchGestureRecognizer : UIPinchGestureRecognizer | |
{ | |
public BTPinchGestureRecognizer(NSObject target, Selector action) : base(target, action) | |
{ | |
ShouldReceiveTouch += (sender, touch) => { | |
//if (touch.View is UISlider || touch.View is MPVolumeView) return false; | |
return true; | |
}; | |
This file contains hidden or 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
# Xcode 4.3.3 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix | |
# Xcode 4.3.2 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix |
This file contains hidden or 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
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |
This file contains hidden or 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
/// <summary> | |
/// Sets the anchor point and translates the view so that it stays in its current position. | |
/// Normally, changing the anchor point also adjusts the view's position. | |
/// </summary> | |
/// <param name='oView'>the view whose anchor point has to be modified</param> | |
/// <param name='oNewAnchorPoint'>the new anchor point</param> | |
public void SetAnchorPointAndTranslate(PointF oNewAnchorPoint ) | |
{ | |
UIView oView = this; | |
PointF oNewPoint = new PointF(oView.Bounds.Width * oNewAnchorPoint.X, oView.Bounds.Height * oNewAnchorPoint.Y); |
This file contains hidden or 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 MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
using MonoTouch.Dialog; | |
using System.IO; | |
using MonoTouch.MessageUI; | |
using System.Threading; | |
using MonoTouch.ObjCRuntime; | |
using System.Globalization; | |
using System.Xml.Linq; |
OlderNewer