10月5日に血圧レコVer2.1リリースしました。
メモリー消費量を減らしたグラフ表示メニュー、パスコード機能追加しました。
よろしくお願い致します。
10月5日に血圧レコVer2.1リリースしました。
メモリー消費量を減らしたグラフ表示メニュー、パスコード機能追加しました。
よろしくお願い致します。
UIDatePickerのローカライズ(言語設定)メモ。
Pickerに関して勘違いをしていたようなので、記録を残す事にしました。
UIDatePickerとUIPickerViewでのローカライズの違い。
UIPickerViewはシステムの言語設定に依存しますが、
UIDatePickerは「カレンダー」と言うこと!ここが異なり、システムの言語設定に依存しません。書式設定に依存しています。
iOS4の頃の仕様とは変わっている気がします(変更されていても当然ですネ)。 記憶が定かではありませんが、、
UIDatePicker 表示の違い
先ずは作成するアプリでは、Xcode で UIDatePicker の Locale を Default に設定してBuild して下さい。
iOS7 の設定 ⇒ 一般 ⇒ 言語環境 ⇒ 言語、書式設定
iOS Developer program 更新時期が来ました。
為替の影響で既に、Apple製品の一部が値上げされているので速攻で支払った。
6月4日時点で、¥8,000 + ¥400 消費税なり。
iOS6.1.3更新後のいろいろ、、
1, Xcodeが実機を認識しない
Xcode が 古いので(Ver4.5.1)更新しなさいとのこと。 最新版は Ver4.6.2 となっている。だいぶ更新されていたのですね、、、
App StoreでXcodeのアップデートしようとすると「ほかのアカウントで使用可能なアップデートがあります」とでるので、めんどうなので放置していたような気がする。
気を取り直して、Terminal からコマンド打って進むぞ〜。
> sudo mdutil -E /
Indexing enabled となれば終了
これで、ようやくApp StoreでXcodeのアップデート可能となりました。。。
1.6G程のファイルのダウンロードと更新の始まり始まり、、
2, CPU使用率が高いまま
Indexing enabled なったことが起因してか mds というプロセスが何か作業をしておりCPU使用率が高いままで、ファンがうるさい!
しかし、何度強制終了しても復活する。不死鳥だぜ、、、
これってOS X の Spotlight という検索機能のインデックスを作るために裏で動いているプロセスみたいなので、インデックスが出来がれば止まるということ? 暫く様子見してみると、、、止まった? 動いているけど更新後の必要な処理が終わり処理量が減った!、結果CPU使用率が下がったとして、これにて終了とします。
iOS 6.1.3 の更新のときエラーが出て先に進まない場合の対処方法。 今さらですが、、
そもそも、更新するのにPCを使う必要は無いのですが、たまたま今回はこうなってしまったので、、
エラー : This device isn’t eligible fo the requested build
このデバイスには資格が無い‥‥とのこと
http://support.apple.com/kb/ts4451
こちらのページの説明の、Macに関して作業を進めると、、
(Windowsでの方法は全然異なるので、、ここでの説明は参考にならないです。。)
1, Applications -> Utilities にある、 Terminal を開く。
2, Terminal にコマンドを打ち込む。 > sudo nano /private/etc/hosts
3, パスワードを聞いてくるので、入力するとこの画面。
4, 画面に表示された、gs.apple.com 設定値の前に、# を入れて無効にする。
上の画面の場合、
74.288.10.249 gs.apple.com となっているので
# 74.288.10.249 gs.apple.com と編集する。
編集は矢印キーで移動して#を入力。
5, control – o で保存
6, control – x でエディター終了
7, 再起動
これで更新作業再開して、めでたしめでたし。。
UTS-8でエンコードしたCSVファイルをWindows版のエクセルで開いた時、日本語が文字化けする件のメモ。
iPhoneアプリ、体温レコ、血圧レコからエクスポートしたCSVファイルで、メモの記述が文字化けする件の修正方法。
Windows7 / Office2010 での説明になります。
1, ファイルをメモ帳で開きます。
2, 「名前を付けて保存」を選びます。
文字コードから「Unicode」を選びます。
ファイル名は拡張子を .txt にします。
「保存」します。
3, エクセルのファイルメニューから「開く」を選択します。
テキストファイルウィザードが表示されます。
「次へ」を選び、2/3ページ目の、区切り文字でタブ、カンマをチェックし「完了」を選びます。
4, 日本語は文字化け無く表示できます。
画面がめくれる効果を実装してみた。
iPhoneのマップに実装してあるのと比較してみる。
マップのはメニューが多い分めくる量が大きいけど、なんかな〜。
コードはこんな感じ
[code language=”objc”]
上へめくる時
-(IBAction)buttonForCurlUp:(id)sender
{
CATransition *animation = [CATransition animation];
[animation setDelegate:self]; [animation setDuration:1.00];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
animation.type = @"pageCurl";
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.50;
[animation setRemovedOnCompletion:NO];
[[self view] exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
[[[self view] layer] addAnimation:animation forKey:@"pageCurlAnimation"];
}
元に戻す時
-(IBAction)buttonForCurlDown:(id)sender
{
CATransition *animation = [CATransition animation];
[animation setDelegate:self]; [animation setDuration:1.00];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
animation.type = @"pageUnCurl";
animation.fillMode = kCAFillModeBackwards;
animation.startProgress = 0.50;
[animation setRemovedOnCompletion:NO];
[[self view] exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
[[[self view] layer] addAnimation:animation forKey:@"pageCurlAnimation"];
}
[/code]
ひさびさにCoreDataの自動マイグレーション作業をしたところ、ハマったのでメモ。
問題があるとCan’t merge models with two different entities named ‘EntityName””; とエラー
1, CoreData定義ファイルを選択したあと、Editor -> Add Model Version を選択
元が「データベース名.xcdatamodeld」の場合、「データベース名 2.xcdatamodeld」が出来ている。
2, 「データベース名 2.xcdatamodeld」にAttributesを追加
3, インスペクタのVersioned Core Data Model の Correntを確認 「データベース名」が「データベース名2」になってるはず
4, Delegate.mに以下の箇所について追加、変更
4,1 – (NSManagedObjectModel *)managedObjectModel
[sourcecode]
– (NSManagedObjectModel *)managedObjectModel
{
if (managedObjectModel != nil)
{
return managedObjectModel;
}
NSString *path = [[NSBundle mainBundle] pathForResource:@"データベース名" ofType:@"momd"];
NSURL *url = [NSURL fileURLWithPath:path];
managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:url];
return managedObjectModel;
}
[/sourcecode]
4,2 – (NSPersistentStoreCoordinator *)persistentStoreCoordinator
[sourcecode]
– (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
if (persistentStoreCoordinator != nil)
{
return persistentStoreCoordinator;
}
NSURL *storeUrl = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"データベース名.sqlite"]];
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
[NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
NSError *error = nil;
persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
// if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:nil error:&error]) {
if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil
URL:storeUrl options:options error:&error])
{
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
return persistentStoreCoordinator;
}
[/sourcecode]