こんにちは、Swift言語にどっぷり浸かってる渡部です。 Swift言語でプログラミングを始めて数ヶ月経ちます。 今回は、気になったことや、覚えておきたい事、Java などの他のオブジェクト指向言語でプログラミングされていた方が Swift言語の実装で詰まりそうな事をまとめてみました。 環境は、Xcode 6.1.1を使用しています。 モダンプログラミング言語、Swift にしびれた! 1.for 句 3種類の記述が可能です。 for – in 文を使って、要素分ループします。
マルバツゲームとは 二人でマルとバツを交互に書いて行って、先に三つ並べた方が勝ちっていう例のやつです。 これの作り方を通して、「Swift分かんない」「iPhoneアプリ作ったことない」という人がiPhoneゲーム開発の第一歩を踏み出すことを目的としたチュートリアルです。 他のプログラミング言語の経験も全くない方でも一応出来ると思いますが、専門用語がちょっと難しいかもしれません ^^; その辺は、まずは目をつぶって頂いて、とりあえず書いてある通りにやってみて下さい。 iPhoneアプリ開発環境であるXcodeの準備とSwiftのとっかかりとしては、こちらのチュートリアルをご覧下さい。 続編も公開中 新しいゲームプロジェクトの開始 プロジェクトの開始方法は2通りあるので、どちらかで Welcome to Xcode画面でCreate a new Xcode projectを選択する もしくは
WWDCでのアップルの発表によると、iOS 8 では4000以上もの API が追加されたとのことですが、新しいAPIはどう使うのか、実際に何がどこまでできるのか、といった具体的なところが、英語のドキュメントや動画をながめているだけだと正直あまりよくわかりません。やはり実際にコード書いて動かしてみるのが一番わかりやすい、ということで今年もつくりました、 iOS 8 新機能のサンプルコード寄せ集めアプリ『iOS8-Sampler』 ソースコードは GitHub に置いてあります。 https://github.com/shu223/iOS8-Sampler ※使い方は Xcode 6 でビルドするだけ なので、デザイナーさんやディレクターさんもぜひ最寄りのエンジニアにビルドしてもらってください。 中身について 今回はデザイナー okazu 氏の協力により立派なアイコンやスプラッシュ画像が最初
引き続きofrubyを作っています。 ファイルを管理する必要が出てきたのでFCFileManagerというライブラリを入れたらEXC_BAD_ACCESSエラーが出て半日位悩んだ。 検索しても分からずじまいで結局本屋に行って文献を漁ってやっと理解出来たのでメモ。 iOSのリファレンスカウントの仕組みは途中で変わっている iOSのオブジェクト(NSなんとか)のメモリはリファレンスカウントで管理される 昔は retain, release, autorelease とか使って自前で管理する必要があった iOS5からARC(Automatic Reference Counting)という自動でリファレンスカウントのコードをコンパイラが生成してくれる仕組みが入った(すごい) ARCでは retain, release, autorelease は書いてはいけない (コンパイルエラーになる) そして
今年の5月くらいの話なのですが、ユビレジのiPadアプリケーションのプロジェクトで使っているStoryboardを基本的に1画面(≒1 View Controller)の単位に分割するということをしました。 1画面1Storyboardメソッドについてはnakiwoさんが書かれた記事も参考になります。 1画面から始めるStoryboard - Cocoaメモ ↑ 上記の資料はどちらかというとStoryboardを使い始めるにあたって、1画面単位で少しずつ使っていこうという感じですが、ユビレジではもともとほぼ全部の画面がStoryboardになっていました。 ただ複数人で共同作業をするにあたっては、1画面単位を1ファイルにしておくくらいがメンテナンスしやすいんじゃないかなあという結論になったのでしばらくそういうふうに運用することにしました。 また、XIBと違ってStoryboardは単純にコ
第7回となるクックパッドさんの #potatotips に参加させて頂きました。 今回は株式会社DeNA@渋谷ヒカリエでの開催でした。 https://github.com/potatotips/potatotips/wiki/Potatotips-7 potatotipsは発表者だけが参加できる、持ち時間1人5分のtips共有会です。 7回目となる今回も濃厚なtipsが多く発表された会となりました。 そんな第7回で発表された11個のiOSのtipsをまとめます! ※Androidのtipsはこちらをご参考ください → DeNA開催! #potatotips 7に参加してきました。 Android tips 11個まとめ iOS tips ICTurorialOverlay @i110さん プロダクトにはオーバーレイ型のチュートリアルを作りがち 透過のviewを張るだけなら良いが、フォーカ
この動画を見るとSafariもMailも写真管理もiPad専用になっていることがわかる。 でかくなったiPodTouchと紹介されている所が多いけど、それは評価を間違っているのではないだろうか。 店頭で実機を見るのが楽しみだ。 Java基礎文法最速マスター - いろいろ解析日記を参考に、Objective-Cのものを書いてみた。 まだまだ歴が浅いので間違っている所があるかもしれません。 [2012-08-03追記] ARCやリテラル表記など新しい記法が導入され、このページに記載されていることは多少古くなりつつあります。ただ、とっかかりとしてかるく読んでみる程度で良いと思います。今や色んな人が解説記事を出しているので、そちらも是非参考になさってください。 追記おわり 基礎 デバッガコンソール出力 Xcodeのデバッガ出力を行うにはNSLog関数を使います。 printfと同様のフォーマット文
最近Objective-C書いてるのでClang-Formatというツールを試してみた。 些末なコードレビュー - naoyaのはてなダイアリー にもある通り、コードレビューするときにいちいちソースコードのフォーマットを指摘し続けるのはアンチパターンで、人間以外がやるべき仕事。 PerlならPerltidyというツールがあるけど、Objetive-C(C, C++)にはclang-formatというコマンドがある。暇なので社内で導入出来るように調べた。 ClangFormat — Clang 3.5 documentation 使い方 CLIの場合は以下のように実行する。-iで指定したファイルを上書き、-styleでフォーマットを指定する。 $ clang-format -i -style=Google Hoge.m これだけで既存のコードがフォマッターの設定通りに整えられる。 2014年
2024年4月1日より、Supership株式会社は親会社であるSupershipホールディングス株式会社に吸収合併されました。 合併に伴い、存続会社であるSupershipホールディングスは社名をSupershipに変更し、新たな経営体制を発足しました。本件に関する詳細は、プレスリリースをご確認ください。 2024年4月1日より、Supership株式会社は親会社であるSupershipホールディングス株式会社に吸収合併されました。 合併に伴い、存続会社であるSupershipホールディングスは社名をSupershipに変更し、新たな経営体制を発足しました。 本件に関する詳細は、プレスリリースをご確認ください。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く