Google のウェブログ公開ツールを使って、テキスト、写真、動画を共有できます。
By Evgeny M., iOS Developer at Rosberry As you remember, in iOS 7 Apple introduced the topLayoutGuide and bottomLayoutGuide properties in UIViewController to describe a screen area that isn’t covered by any content (status bar, navigation bar, toolbar, tab bar, etc.) In iOS 11 Apple has deprecated these properties and introduced the safe area. Apple suggests that we do not to place any controls ou
I'd like to append an NSTextAttachment image to my attributed string and have it centered vertically. I've used the following code to create my string: NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:DDLocalizedString(@"title.upcomingHotspots") attributes:attrs]; NSTextAttachment *attachment = [[NSTextAttachment alloc] init]; attachment.image = [[UIImage imageNam
iOS7からAPIが公開された音声読み上げ機能。 これを使うと、アプリに読み上げ機能をつけることができます。 メールを読んだり、ニュースを読んだりしてくれるアプリもできるかも。 ……と期待して、ちょっと使い方をまとめてみました。 (iOS7.0.2、Xcode5.0、iPhone 5sで動作確認しています。) 基本的な使い方 まずは、文章を設定して読ませてみましょう。 最初にプロジェクトにAVFoundationをリンクします。 それから、適当な場所で AVFoundation/AVFoundation.h をimportしてください。 そして、AVSpeechSynthesizerをちょこちょこっといじってみます。 // AVSpeechSynthesizerを初期化する。 AVSpeechSynthesizer* speechSynthesizer = [[AVSpeechSynthe
Step 1: Include your fonts in your XCode projectMost commonly, you’ll have a TTF or OTF font that you’ll want to use with all of your UILabels or UITextViews in your app. Well, the first step is to include these fonts into your XCode project. I commonly keep all of my app resources such as images or fonts in their own directory called “Resources”. I find that this helps me stay organized as projec
Eureka EngineeringLearn about Eureka’s engineering efforts, product developments and more.
追加方法 Swift package manager File > Swift Packages > Add Package Dependency Add https://github.com/MasamiYamate/YMTGetDeviceName Select "Up to Next Major" with "5.4.0" Carthage Add to Cartfile public class YMTGetDeviceName { /// Device codes enum DeviceCode: String { // MARK: Simulator case i386 case x86_64 // MARK: iPod /// iPod Touch 1st Generation case iPod1_1 = "iPod1,1" /// iPod Touch 2nd Gener
iOS Tutorial: How to search for location and display results using Apple’s MapKit Search for places using MKLocalSearchRequest and display results with UISearchController Apple provides a powerful native map API called MapKit. You can display a map, show the user’s current location, and drop annotation pins. And you don’t need to rely on any third-party SDKs. For example, if you’re building an app
はじめに Charles を使うと PC 上に HTTP プロキシを立てて端末の通信をキャプチャし、リクエストやレスポンスの内容を覗いたり書き換えることが出来る。類似のソフトウェアとして Wireshark や Fiddler, Paros がある。 アプリの開発をしていてよくあるのは、APIがスタブで固定値しか返してくれない、異常系エラーのデバッグがやりづらい、という場面だが、Charles なら通信を好きに値を書き換えられるのでこれらに簡単に対処することができる。 Charles は Java アプリなので OS X だけでなく Windows や Linux でも利用する事が出来る。本稿では OS X + iOS での利用を前提として Charles の導入から簡単な使い方までを説明するが、環境依存の箇所は適宜読み替えてほしい。 導入 本来は有料ライセンスだが、無料でも数分間だけ使用
2016/8/15更新 汎用性高めのExtension集です。後半にライブラリもまとめました。 Swift2.2で確認済みです。 紹介している全てのextensionを導入したリポジトリを公開しています(紹介していないものも含みます)。 詳しくは下記をご覧ください。 iOSアプリをハッカソンで作るときに便利な初期プロジェクトを作ってみた Swift3版はこちらです。 クラス名の取得 extension NSObject { class var className: String { return String(self) } var className: String { return self.dynamicType.className } }
Takuya Digital crafts(man|dog). Love photography. Always making otherwise sleeping. born in 1984. 概要 AutoLayoutが超手軽に使える、Masonryをご紹介します! AutoLayoutで動的レイアウト、しかし… 不特定なサイズの画像や長さのテキストを取り扱う時、どうしても固定サイズのViewレイアウトでは限界があります。 コンテンツのサイズに合わせて、動的にレイアウトを調整する必要があります。 また、単にText ViewやImage Viewのサイズを変えればいいのではなく、周辺のViewも調整が必要なので結構大変です。 そんな動的レイアウトの要件に対しては、AutoLayoutがよく使用されます。 AutoLayoutは、親Viewのサイズ変更があった時に子View同士の間隔やサ
/tmpと/Cachesディレクトリ内のファイルは、iTunesのバックアップ対象外でシステムにより自動で削除されます。 何となく使っていたら容量不足でアプリがクラッシュしてしまったので、2つの違いと運用方法について調べてみました。 パスの取得
#import <UIKit/UIKit.h> @class ViewController; @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) ViewController *ViewController; @end - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #pragma mark -xib化 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.ViewControl
SDWebImageを使うと、簡単に画像を非同期でダウンロードできて、かつUIImageViewに設定することができます。 SDWebImage 参考 SDWebImageを初めて使う際の注意点 【iOS】SDWebImageでアプリ容量がどんどん増えていく件 ImageIO.frameworkとMapKit.frameworkの追加が必要です #import "UIImageView+WebCache.h" - (void)viewDidLoad { NSURL url = [NSURL URLWithString:@"http://hogehoge.com/hoge.png"]; [imageView setImageWithURL:url placeholderImage:nil options:SDWebImageCacheMemoryOnly]; } placeholderIma
README.md TensorFlow iOS Examples This folder contains examples of how to build applications for iOS devices using TensorFlow. Building the Examples You'll need Xcode 7.3 or later, with the command-line tools installed. Follow the instructions at tensorflow/contrib/makefile under "iOS" to compile a static library containing the core TensorFlow code. Download Inception v1 , and extract the label an
iOS8でデバイスの向きに対する扱いが変わった iOS8以降、Adaptive UIやSize Class、Trait Collection等の新しい概念が導入され、レイアウトへの考え方が大きく変わりました。それに伴い、デバイスの向きに対する考え方も大きく変わっています。 Device Orientation -> Size Class iOS7以前は、Landscape/Portraitが変更されたことは、画面の向きが変わったという意味でハンドリングされてきました。 iOS8以降、Landscape/Portraitの変更は、画面がリサイズされた(= Traitが変更された) という意味で取り扱われます。 WWDC2014のBuilding Adaptive Apps with UIKitでも触れられています。解説記事を見るよりも情報量は多いので、是非見てみてください。 Rotation
皆さんiOSでシングルトンは使っていますか? シングルトンはいわゆるデザインパターンと呼ばれるもので、複数のクラス間の変数、オブジェクト、メソッドのやりとりを劇的に簡単にすることが可能です。 このように便利ですが今ひとつとっつきずらいiOSのシングルトンについてこの記事では少々解説したいと思います。 シングルトンを使用したクラスには、例えば以下のメリットが有ります。 ・複数のクラス間での変数やオブジェクトの共有が簡単にできる。 ・複数のクラス間でメソッドの共有ができる。 ・ViewControllerの機能を分担させることができる。 一方で、以下のようなデメリットも有ります。 ・不要になっても自動的に解放されない。 ・何度もインスタンス化することができない。 必要に応じて、通常のクラスとシングルトンを適用したクラスを使い分けるといいと思います。 シングルトンですが、シングルスレッドの場合は
App Groupsというのは、同一ディベロッパーがリリースしたアプリ間でデータのストレージを共有できる機能です。 このストレージには任意のファイルの書き込みが可能で、UserDefaultsや画像データなどを格納して共有する事が可能です。 前回記事から引き続き、弊社アプリ「ファミキャプ」にウィジェット機能を実装していますが、containing app(ファミキャプ本体)でキャプチャし保存された画像をToday Extension(ウィジェット)側で表示したかったのですが、相互に保存データのアクセスを行うにはApp Groupsを使用しなければなりませんでした。 App Groupsの設定を行うには2通りの方法があります。 まずは簡単な方法としてXcode上で設定する方法を説明します。 XcodeでApp Groupsを設定する Xcode上でApp Groupsを設定する条件として、会
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く