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
| // | |
| // CircleView.swift | |
| // CircleViewSample | |
| // | |
| // Created by 田村孝文 on 2016/08/07. | |
| // Copyright © 2016年 田村孝文. All rights reserved. | |
| // | |
| import Foundation | |
| import UIKit |
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
| class MainClass | |
| { | |
| public class Hoge | |
| { | |
| // Actionの他に EventHandler<object o, EventArgs e> がある。 | |
| public event Action<string> ActionHandler; | |
| // Actionは、 Action Action<T> Action<T1,T2> 〜 Action<T1...T16>まである。 | |
| // http://msdn.microsoft.com/ja-jp/library/system.action(v=vs.110).aspx | |
| public void DoAction () | |
| { |
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 override void ViewDidLoad () | |
| { | |
| base.ViewDidLoad (); | |
| Console.WriteLine ("A1 delegate == nil? {0}", (this.TableView.Delegate == null) ? "YES" : "NO"); | |
| Console.WriteLine ("B1 weakDelegate={0}", this.TableView.WeakDelegate.GetType ()); | |
| this.TableView.DecelerationStarted += (sender, e) => { | |
| Console.WriteLine ("scrolled."); | |
| }; | |
| Console.WriteLine ("A2 delegate == nil? {0}", (this.TableView.Delegate == null) ? "YES" : "NO"); | |
| Console.WriteLine ("B2 weakDelegate={0}", this.TableView.WeakDelegate.GetType ()); |
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 System.Collections.Generic; | |
| using System.Linq; | |
| using MonoTouch.Foundation; | |
| using MonoTouch.UIKit; | |
| using MonoTouch.Dialog; | |
| namespace MyTasky.Screens | |
| { |
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 System.Collections.Generic; | |
| //using System.Linq; | |
| using MonoTouch.Foundation; // NSxxxはこっちに入っている? | |
| using MonoTouch.UIKit; // UIxxxはこっちに入っている | |
| // https://xamarin.com/getting-started/ios にあるサンプル、Taskyを自力で作っていく | |
| // | |
| // XamarinStudio用のgitignoreの作り方 |
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
| @interface HitTestNavigationBar : UINavigationBar | |
| @end | |
| @implementation HitTestNavigationBar | |
| - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event | |
| { | |
| NSLog( @"hitTest point.y=%.1f",point.y); | |
| if ([self pointInside:point withEvent:event]) { | |
| self.userInteractionEnabled = YES; | |
| } else { | |
| self.userInteractionEnabled = NO; |
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
| #pragma mark - UIScrollViewDelegate | |
| - (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView | |
| { | |
| // section=1までスクロールする | |
| NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:1]; | |
| [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES]; | |
| // システム的な自動スクロールは停止 | |
| return NO; | |
| } |
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
| -(void)viewDidAppear:(BOOL)animated | |
| { | |
| [super viewDidAppear:animated]; | |
| // ボタンの画像とtitleを入れ替え | |
| // ButtonAは入れ替えない。 | |
| NSLog(@"self.buttonA.titleLabel=%@",self.buttonA.titleLabel); | |
| NSLog(@"self.buttonA.imageView=%@",self.buttonA.imageView); | |
| // ButtonBは、「移動させる方向に-1*サイズ分」設定してみる | |
| CGFloat titleWidthB = self.buttonB.titleLabel.bounds.size.width; |
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
| import Cocoa | |
| // http://qiita.com/saiten/items/c2ac4df40ad001179afa | |
| // https://github.com/saiten/STDeferred/blob/master/STDeferred/STDeferred.m | |
| // を参考にした。 | |
| class PAMDeferred{ | |
| class func deferred()->PAMDeferred{ | |
| return PAMDeferred() |