Posts for 'Tech'

Page 3 of 712345...Last »

Zooming to a point in UIScrollView

January 14, 2012 •

(Updated March 2015) I’ve rewritten the code for zooming to a CGPoint in a UIScrollView to be even better in a new blog post. Go check it out!

If there’s one piece of functionality that has become basically boilerplate on iOS, it’s the concept of double-tapping a zoomable UIScrollView to quickly zoom in on a given point. When I was writing the code for displaying pages in iComics, I assumed that this would be a really simple thing to do. I mean, surely all you’d need is a UITapGestureRecognizer attached to a UIScrollView that passes the location of any double-taps to the scroll view… right?

Nope. XD

Turns out that although there is a UIScrollView method called ‘zoomToRect‘ (which lets you zoom to a specific CGRect region of a UIScrollView), out-of-the-box, there is no official way to procedurally zoom into a specific CGPoint. This actually surprised me greatly since I would have thought it would be a standard part of UIKit.

In any case, I did a bit of searching around on Google, looking for some code that would let me do this easily. I found a few bits of code here and there, however they were written in such a way that unless the minimum and maximum scales of the scroll view were set up in a specific way (Uh, which in iComics’ case, they weren’t), the zooming wouldn’t work properly at all.

So, cutting to the chase, I decided to just roll my own category for UIScrollView to add that functionality to it. All it does is take a CGPoint (relative to the bounds of the scroll view itself) and a scale, and translates those to a CGRect that can then be passed to UIScrollView’s drawToRect method. :)

Continue reading

MacBook Air!!

November 25, 2011 •

Shiny...So, in my last post, I added a rather cryptic photo of an Apple product I received for my birthday. Now that I’ve spent a week breaking it in,  I can write a blog about it!

It’s a shiny new MacBook Air. Core i7. :D

Up until now, the 13″ MacBook Pro I’ve been using has been a loaner from work. And while that laptop has been absolutely fantastic, being absolutely invaluable in at work, not to mention being a great help with some of my side projects in helping further my knowledge of iOS dev, I figured that now that I’m actually starting to get requests for paid commissions, I’d be in a much better position if I bought my own hardware dedicated for that. It also means ensuring I have the proper licenses for all of the software I use is a lot easier too. ^_^;

So, after much research, and coming very close to buying a 15″ MacBook Pro, I decided to go with an Air.

Ultimately, when it came down to the tradeoff between power and physical weight, I decided that I’d rather go with a lighter laptop than a more powerful (but more heavy one) one. While the 15″ Pro is amazing, and from what I’ve seen, even runs rings around my desktop PC, I decided it was too big and too heavy for my liking. And going off the assumption that the Air would be at least as powerful as my 13″ Pro at that point, I figured it should handle everything perfectly.

And boy does it ever! :D

If you’ve had any doubts that the MacBook Air doesn’t really stand up to the Pro series (at least the lower end), you can put them to rest. This thing is extremely snappy in pretty much every case I tried, and the graphics processor can handle running at 2560×1600 at no trouble at all.

Obviously, it isn’t as powerful as most of the Pros can potentially be (eg 8GB RAM, truly quad core CPU etc), so if you’re looking to do really intense things like edit video or play games, I might recommend the Pro. But for my kind of daily usage, which consists mainly of Photoshop design, web code,  and/or iPhone app design, this thing is perfect on all counts.

I’m still wrapping my head around Lion here. There are quite a few new features to get used to. Also, I’m still trying to figure out what other apps I need to fully deck it out. I might write another blog later… XD

Alright. Here endeth the Apple fanboy post. XD


October 17, 2011 •

It still works.... kinda

(This is a Japanese translation of this blog post)

iOS 5の配達より、iずかんはもっとエラーが出て、ちょっと壊れちゃった。 残念ながら通信を停止しなきゃいけなかったから、もう直せない。 もし手伝いたかったら、この請願をサインください!


iOS 5がやっと出たね! 楽しみ! もうiPadを完全にアップデートして楽しんでる! いっぱい新しい機能があって、これから来る新しいアプリをよく楽しみにしてる! しかし、実はiOS 5が出る日をちょっと絶望的に待ってた。 なぜなら、iOS 5でiずかんがちょっと割れる事が分かってたから。 今まで、アップル開発の契約のとおり、iOS 5の機能は秘密で、何も言えなかった。

とにかく、アプリの本体はだいたい大丈夫みたいだね。 クラッシュとかは今まであまり見てなくて良かった。しかし、結構大変なバッグが現れたようだ。 もし、どこでもの「並べ替え」のボタンを押すと、普通のようにメニューが現れるが、終了とカンセルのボタンが消えてる。 実はそのボタンはまだあるが、上のメニューの下で表示されていて、もう押す事ができなくなっちゃった。 ^_^;


コード敵にはこれを直すのがとても簡単だが、前に株式会社ポケモンにアプリ配信をやめるようにお願いされたから、そのアップデートが出せない。 :(

これで、とてももうしわけございませんみんな。 これじゃもうなにもできない。 そしてこれからも、iずかんがもっと悪くなる可能性があって、心配してる。 ^_^;


とりあえず、僕らができるしかない事はただひとつがあると思う。 それはポケモン会社にどれほどポケモン図鑑アプリが人気な物を知らせる事だと思います。 とにかく、ネットで請願があって、もし暇な時があったらサインください。 :)

とにかく、iずかんをよく使っていたら、iOS 5にご注意ください。 そして、アップグレードの時に、iずかんをパソコンにバックアップしてください。 アップグレードではエラーがあったら、削除されちゃうから。 ^_^;


iPokédex and iOS 5

October 13, 2011 •

It still works.... kinda

TL;DR iPokédex has become slightly broken in iOS 5. No, I can’t fix it. If you want to help out, register your interest by signing this petition!
Hey guys! :)

iOS 5 is finally out! As I write this, I’m currently taking my iPad through the long backup and upgrade process. As excited as I am about iOS 5 (I can tell you, there’s some AWESOME new stuff in there :D), I’ve actually been dreading this day. Why exactly? Well I’ve known for some time that iOS breaks iPokédex in a pretty epic way. I probably could have mentioned it earlier, but I decided I should wait until the NDA is good and done with. ^_^;

Now, while the app itself is still stable, due to a bit of my dodgy coding and lack of foresight (this was my first major version upgrade as a developer!), an issue has arisen where if you press ‘Sort’, you’ll no longer be able to dismiss the sorting menu. While the ‘OK’ button and the ‘Cancel’ buttons are still being drawn, the code I’ve written that re-positions them to be placed under the scroller view has stopped working (so they’re appearing behind it right now, out of reach). At the moment, the only way to dismiss the dialog is to fully quit out of the app (ie, remove it from the multitasking bar) and start it up again. :(

As far as functionality and usability goes, this is a pretty bad thing, and if I had submitted the app to the App Store with a bug like this in it, it would have most certainly been rejected. ^_^;
I’ve already started receiving emails from users who have upgraded to iOS 5 and have found the error.

Code-wise, this is a VERY easy thing to fix (it’s like 1/3 of a line of code). I’ve already fixed it in the version I carry around on my iPhone. XD
Sadly, however, as I was requested by the Pokémon Company to take the app down, I am unable to distribute this fix to anyone else. :(

I’m really sorry about this guys. The user experience is going to start deteriorating and there’s nothing I can do about it. And I fear it’s going to become more frustrating to watch as time passes, and more emails from users start piling in. ^_^;

Either way, I’m not going to give up until the very end. The lawyer I talked to at TPCI was very kind to me and told me they might take iPokédex over to licensing to see if they might be interested in working something out. I haven’t heard back anything at all on that front in a while now, but as it’s most likely the final avenue, I’m more than happy to wait.

In the meantime, if you’d like to help out, there may be a way for you to do so. :) When Nolan Lawson’s app Pokédroid was pulled, a dedicated young lady named Amber set up a petition to try and convince TPCI otherwise. The petition goes on the record to state that since these kinds of apps are free, and that the information contained within is easily accessible on a multitude of sites, there shouldn’t really be a compelling reason for TPCI to want to shut these apps down. Now, while the lawyer from TPCI explained to me that it’s a pretty open and shut case in that TPCI has simply decided not to allow unauthorized apps, I think the petition is a good idea, if not to simply raise awareness on the amount of interest there is on having some kind of official Pokémon reference app.

At the moment, the petition only has a handful of signatures, so head on over there and sign it!

In any case guys, if you’re a heavy user of iPokédex, I’d recommend hanging off upgrading to iOS 5 as long as you can. ^_^;

RIP Steve Jobs 1955-2011

October 7, 2011 •

After writing that last post, I knew it was only a matter of time until the day came. I didn’t expect it to come this quickly though.

Sadly, the day has come. Steve Jobs has passed away at the age of 56. Too young. Way too young.

It’s hard to actually fathom how much of an impact Steve actually had on the technology world. It probably wouldn’t be a far stretch saying that damn near everything we take for granted in personal computing could be attributed to him in some shape or form. He is truly one of the few people who actually managed to drastically shape the world.

I hold Steve as one of my main role models in pretty much everything that I do. He started Apple in his garage, and managed to take it all the way to being one of the most (if not THE) successful companies in history. He’s shown countless times that nothing is impossible. All you need do is believe in your endeavours and persevere them with a fiery passion.

There’s going to be a pretty sad air around our house for a little while. My family’s been devout Apple users since the very beginning (I’m the black sheep for owning a Windows PC), and it’s probably going to take a little while for it to sink in. At the moment, I’m regretting never going to a MacWorld or WWDC conference and seeing the man in person.

As far as Apple is concerned, I think they’re going to be alright. If there’s one thing product Steve managed to create over the past decade, it’s a company that is able to continue on, up to his level of expectations, even when the time came for him to leave. I still expect great things from Apple.

In the meantime, I’m very much looking forward to the release of his biography on the 24th. It’s going to be very interesting to read about what he was up to in these final years.

Thanks for everything Steve. There’ll never be another one like  you.

iQuit: Thanks for everything Steve!

August 25, 2011 •

Steve Jobs, looking like a boss.

Wow. Now I know this was probably to be expected, but now that it’s come, it feels pretty sudden. Today Steve Jobs stepped down as the CEO of Apple for the second time, and most likely, for the last time. :( It’s probably safe to say that the whole internet (more or less XD) is abuzz with the news and most people aren’t taking it too well (eg Wall Street lol).

I dunno if I’ve said it much before, but we are complete Apple nuts in my household. My father has been with Apple since the beginning; since the original Macintosh computer and has NEVER deviated since then (currently rocking a MacBook Air XD). When I bought a Windows PC for my university studies, I almost got evicted from the family. ^_^;

It’s really hard to put in perspective how much Steve has personally contributed to the sheer ‘concept’ of personal computing (and by extension now, the concept of post-PC computing), but it’s probably safe to say that he is without a doubt one of the pioneers and forefathers of most of the technological customs we take for granted today.

Now, it’s been said he’s not leaving entirely and he will be remaining as Chairman of the Board, so it’s quite possible that this isn’t going to be as bad as everyone is making out. Odds are he’ll still be making sure all of the products leaving Apple are still up to his level of standards, and that the rest of the responsibilities of managing the company will now rely on Tim Cook. So all in all, I really don’t think Apple is going to rapidly change much at all now, or in the perceivable future.

In any case, since now is as good a time as any, I would personally like to thank Steve for everything he’s done, and I wish him the very best from here on. :)

Page 3 of 712345...Last »