• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

お陰様を持ちまして、iPhone/iPad向けアプリ「ハンドミラー」のダウンロード数が25万ダウンロードに到達しました :)

AppViz 2
Uploaded with Skitch!

最初のバージョンは10分で作ったアプリでしたが、多くの方々に使っていただいているのは感慨深いですね。 ずっと無料なので収益は無いですが、ランキングとダウンロード数の動向を把握するのに役だってます。 最新バージョンでは1クリックでズームイン・ズームアウトする機能がついております。ぜひお試しください。

posted by Png genki on Fri 30 Sep 2011 at 04:14

また忘れたのでメモ。
NSIndexPath UIKit Additions というタイトルでiOS 4.3 Libraryに登録されています。

+ (NSIndexPath *)indexPathForRow:(NSUInteger)row inSection:(NSUInteger)section

コードにこんな感じで:

   1      NSIndexPath* indexPath = [NSIndexPath indexPathForRow:0 inSection:0];  

posted by Png satoko on Thu 8 Sep 2011 at 17:07

どこが違うのか気になったのでメモ。 Window-based ApplicationをView-based Applicationと同じところまで持っていく作業を書き出してみます。

※ Xcode 4.1で動作確認しています。

Window-based Applicationを作成

RootViewControllerを作成

File - New - New FileでUIViewControllerテンプレートを選び、RootViewController(.h, .m, .xib)を作成する

Interface Builderで作業

MainWindow.xibを開く
View - Utilities - Show Object Library を開いて、

  1. View ControllerをDrag & Drop

View - Utilities - Show Identity Inspector を開いて、

  1. 先にDropしたView Controllerを選択
  2. Custom ClassのClassをRootViewControllerに
  3. (LabelをRoot View Controllerに)

View - Utilities - Show Attributes Inspector を開いて、

  1. View ControllerのNIB NameをRootViewControllerに

View - Assistant Editor - Show Assistant Editor を開いて、

  1. AppDelegateクラス(h)を開く
  2. IB上でoptionキーを押しながらRoot View Controllerを選択、(hファイル上まで)DragしてInsert Outlet Connectionを追加(Name:viewController)

下記のようにコード生成されます:

   1  @interface RootViewControllerProtoAppDelegate : NSObject <UIApplicationDelegate> {
   2      RootViewController *_viewController;
   3  }
   4  
   5  
   6  @property (nonatomic, retain) IBOutlet UIWindow *window;
   7  @property (nonatomic, retain) IBOutlet RootViewController *viewController;

エディタでの作業

AppDelegateクラスのhで、@classを追加:

   1  @class RootViewController;

AppDelegateクラスのmで、#import、さらにself.viewControllerをself.window.rootViewController

   1  #import "RootViewController.h"
   2  
   3  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
   4  {
   5      // Override point for customization after application launch.
   6      self.window.rootViewController = self.viewController;
   7      [self.window makeKeyAndVisible];
   8      return YES;
   9  }

厳密に言うと、View-based ApplicationではviewControllerの宣言のされ方が若干違います。そこは各自確認下さいませ。。
作業をしてみてIB経由でクラスにViewController変数を追加するのはやったことなかったので、とても勉強になりました :)

posted by Png satoko on Tue 6 Sep 2011 at 15:32

One of my websites had begun to use Amazon ELB for load balancing. After that, I have experienced the issue that I can't do +1 at the site.

ss

As long as I see the webmaster tools, the +1 audience has stopped its increase since that time. In addition, the site has issues too on several Google's services such as Google Wireless Transcoder, Google Translation and so on. They report that it can't access to the site.

In my observation, some of Google servers have incorrect DNS caching, so thus the services couldn't access to the site, because the IP address is no longer pointing the original server.

The DNS of Amazon ELB has TLS of 60 seconds. Google's DNS caching should expire within that period.

See Also

Update

It's turned out that Google+ itself too causes this problem.

ss2

posted by Png takiuchi on Mon 5 Sep 2011 at 05:34
Contents
iPhone/iPad向けアプリ「ハンドミラー」25万ダウンロード
UITableView用のNSIndexPathの作り方
Xcodeのテンプレート、View-based ApplicationとWindow-based Applicationの違い
Google +1 button causes trouble with Amazon ELB
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ