[Open Source]FVGravityView

No Comments

Hey folks, I’m proud to announce my new open source project for iPhone. It’s called FVGravityView. It’s basically an UIView that has the ability to fall. Yes, fall. It uses the accelerometer to detect the device position and the view will fall depending on it. It’s basically an UIView that recognizes gravity.

A few thing:
-The default velocity is 20, but you may change this value by changing the velocity property.
-FVGravityView supports dragging. To enable it, set the property isDragable to YES.
-Say you want to invert the gravity. Just set the isInverse to YES.
-It’s basically an UIView, so you may add subviews to it. It also has every drawing capabilities that an ordinary UIView has.

To download the sample project, click here.

PS: I didn’t try it on an iPad, but it should work with no problems at all.

Documents folder and UIFileSharing

No Comments

On the iOS, we can only save files on the documents folder. The bundle for example, is not writable. Getting the path of the documents folder is easy. Just use the following code:

NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documents = [[array objectAtIndex:0] copy];

The variable documents will be the path to the documents folder. Now if you want to create an URL from it, use the following code:

NSURL *url = [NSURL URLWithString:documents];

Say you saved a couple files and want your users to be able to transfer it to their computers. On iOS 3.2, Apple introduced UIFileSharing. It allows users to transfer files from their iOS devices to any computer running iTunes. To enable that, just add the Application supports iTunes file sharing line to your info.plist and check the box.

Your users will be able to transfer any file from the documents folder to a computer. To do that, open iTunes then click on your device name. Go to the apps tab and scroll down.

Just drag and drop any file to/from the documents table view.

iPod touch replaced!

No Comments

Read this post if you haven’t done so. I finally got my iPod touch back. Apple replaced it and now it’s working. It took just one week to they to replace it. I’ve sent it to another authorized technical assistance last saturday. This time, I sent to a honest one. :)

They were very nice and replaced it with no problem. On Monday, I will be calling Apple and tell them what the first assistance did. I also wonder how many people pay that fucking R$480.00 fee. I really hope Apple will do something about that fucking assistance called MacInRio.

iPod touch news

1 Comment

If you didn’t read this post, read it before.

Well, I set my iPod touch to an Apple authorized technical assistance, they said it would take about 20 days. Few days ago they call me saying they will not fix it because “you dropped it”. I didn’t drop it. I still don’t know how it happend. Anyway, let’s move on. When I was there to get it, they said it happend because someone tried to open it with a screwdriver. WTF? A screwdriver? No one tried to open it. Also I’m not a hardware n00b. I know very well that I shouldn’t open things if I don’t know how to open them. When I read the paper they gave me, it wasn’t saying anything about dropping it or a screwdriver, but that I caused it. It had no information about how I “caused” it. So, was it a screwdriver, I dropped it or what else? Can’t those guys make a decision? The paper also said they would charge me R$480.00 if I wanted to have it fixed. That’s all I needed to know! I wonder how many people pay them that absurd fee. Those motherfuckers just wanna make some money. They suck balls. They are not honest. Note that a brand new iPod touch would cost R$699.00.

So today I’ve been at MacStore. I had a problem with my iPod video in 2007. It was under warranty and they solved it. They are much more serious. The man that talked to me said it would take up to 20 days to they to replace it, but it would probably be with me in one week. Well, much better. I hope they solve it.

iPod touch replacement

3 Comments

My iPod touch has been sent to Apple, so they can replace it. Yesterday the power button just stopped working. This made it impossible to keep using that iPod. It’s pretty hard to use it when you cannot lock the screen, or even turn it on/off. Today I’ve been at MacInRio(link in Portuguese) to ask them to replace it, as it’s still under warranty. It can take up to 20 days to they to replace it. Unlike in other countries, there’s not official support from Apple in Brazil. There are authorized resellers who can fix Macs, iPods and etc. When an iPod is still under warranty, they replace it instead of fixing it. To you to have an idea of how it works, they send it to California, then Apple verifies if they will replace it, then they send a new one back to Brazil. Anyway, I’m gonna use my old iPod video while it’s being replaced.