Wednesday, June 29, 2011

This trick will be helpful for people who are trying to embed Opengl ES code in their iPhone project.
One way to let your compiler know that you will be using mix of C++ and objective-C will be to convert the extension of all .m files to .mm as discussed in one the previous post(LINK) but there is another way if you don't want to change all the extensions !

Tuesday, June 28, 2011

Well. Team was trying to create this first OpenGL ES code following the instructions of Chapter 1 in iPhone 3D Programming by Philip Rideout, and faced problem of specifier-qualifier-list in my .hpp file.
Well, to fix this problem do following:

Monday, June 27, 2011

CoreImage framework introduced in iOS 5 API has classes called CIFaceFeature and CIDetector.This class has potentially has been added for detecting face feature in the image. Currently, it offers following functionalities:

You need iOS 5 for this.To activate Split Keyboard on iPad, find and long press the keyboard icon at the bottom right of the keyboard.This will give you 2 options: undock and split. With undock you can set the keyboard higher or lower on the screen. With split, you can split the keyboard.

/*This command will actually open VIM editor and will ask you to enter the commit remark.Once you done with writing your remark, you can press ESC then :wq to exit out of VIM editor.*/

Reetu-Rajs-MacBook:MIMSlideShow reeturaj$ git commit -a

[master 1e1fd23] Test Commit

3 files changed, 4532 insertions(+), 4538 deletions(-)

/*This command will push all the latest changes on remote Github repo.*/

Reetu-Rajs-MacBook:MIMSlideShow reeturaj$ git push origin master

Counting objects: 19, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (9/9), done.

Writing objects: 100% (10/10), 7.05 KiB, done.

Total 10 (delta 4), reused 0 (delta 0)

To git@github.com:ReetuRaj/MIMSlideShow.git

3ef6aac..1e1fd23 master -> master

CASE 2:

As shown in above lines you can find how many files were modified or added by following command:

Reetu-Rajs-MacBook:MIMSlideShow reeturaj$ git commit -m "commit 1.1"

If you see that new files were added, you will get following for the files which are new and not available on the remote Github repo. In my case, README file is not yet present on remote Github repo but its present on my local Github repo. So obviously I want to add it on my remote repo.

If you have not set up your github on your mac yet. Here is the link to do so which is its official page. I followed the same :)LINK

Well.. After I followed all the steps on github like created a repository, added the ssh key etc as described in the set up link I provided above.

Now the time comes for me to upload my project on github.

So, my project is in Home/Documents/MIMSlideShow/
I navigate to that directory and then created a local git repository and pushed my project on the remote MIMSlideShow folder.The highlighted lines were written by me and non-highlighted lines are the system messages.

Ok. After delaying the process for so many days, I decided to just do this task pending on my to-do list !
Now on, all my opensource projects/codes will be available on github repositories !
I have been constantly getting hit by new ideas to do and my to-do list is just getting bigger day by day ! :)
So more articles will be arriving on blog :)

Anyways. If you want to set up your github too. Here is the link to do so which is its official page. I followed the same :)

There is a good news. I am trying to work on this opengl ES tutorial series which is loosely based on the legendary NeHe opengl tutorial series. I will be following kind of same topics but in opengl ES :) Also going to put all the tutorial source code on the github. I have been getting constant emails about how the basic codes in my articles which I have uploaded so far have been helping people in getting things going. I am really really glad that I could be useful for the coder community.

For everything there is some inspiration, I was looking at those cool transition effects available on .ppt in Microsoft Powerpoint software , so I thought may be I should write some of my own transitions effects which can be easily applied for creating a cool effect in slideshow on an app.
Here are some screenshots of the first transition effect I have written.

Friday, June 17, 2011

1. If you want to transfer your photos which you have gather over the time to your iPad Simulator.Then easiest way it to Open the Safari on iPad Simulator. Drag and drop that image on Simulator, it will open the image on Safari on Simulator. Long Press on it will ask you Save or Copy. You simple press Save.
Then you go to your Photos application of iPad. And you will be able to find your recently added photos in there !!

2. You can directly download the images from web. Open the desired webpage on Safari on iPad simulator. Long press on image of webpage which you would like to save. It will give option to Save the image, so you save it ! You will find that image in Photos application of your Simulator.

Here is the update. I have created a color picker which user can use to choose the color of his text. It looks ok but oh well, I am here to create some features. Don't care much about UI right now. May be if some UI designer gets to read this post, he/she can help me.

Well. I have been digging around a lot. And in order to have my own customized select text feature I will be doing a post-mortem of a linux text editor written in C to get an idea of the libraries which will be used to do in the meanwhile for today I will just release the color picker for the rich text editor.

I have recently been haunted by the universal question of how to reach people. And reach right people. The people who will be really interested to know what you write about. For software developers.. they only google when they want to find out a particular programming related problems. Well as I don't have any sponsor to help me with advertising. Well I don't know if would like to spend on advertisement as I want it to be more real process. Like if some people like my blog because of its content then they will refer it to their friends.
But I think twitter is a great way to reach your audience as it keeps it short through microblogging so with just few words and time you can figure out whether you want to follow a person or not I was searching about it and I found this wonderful article by Lisa Orrell.
She has written good about resources which can help you achieve it. She has talked about

Wednesday, June 15, 2011

Unfortunately, bottom line is that you can't do that in UILabel. Either you gotta use UIWebView or you gotta use CoreText frame work. HEREis my tutorial for CoreText beginners hope it helps you to create the Text Labels with multiple color. Comment me or email me in case of any questions.

Well. I was just goofing around on web when I found there is no native API on iOS which lets you create rich text editor while its available for mac SDK.I looked around a lot whether there are any libraries budding up . There is one called OMNI group rich text library, they have done a good job. They are developing more features in it.There are people countable on finger who have actually talked about this on their blog. One blog is really recommendable. They have have been able to create the multi colored text along with the pointer.LINK TO ARTICLE.There is a new app launched recently called Essaywhich is a rich text editor for iOS, but sadly there aren't very great reviews about it either. I haven't used it myself to I have to depend on the opinion of the reviewers.And also its not open source so its of no help to other developers.LINK TO ARTICLE.

And So I decided to take a plunge myself and see what good I can come up with.

This is the article about my own iOS Rich Text Editor . I am going to name my little Rich Text Editor as MIM Text Editor.

So here is the first update. I am planning to release the open source API quickly before Apple's releases the iOS 5 in market. My goal will be to make it really really easier for developers to use it. Just like Apple's way . Keep it simple !Developers will be able to just stick it into their application and it will be ready to go.

I have taken up a really huge project in my hand I know.. there are so many things which are possible in a rich text editor.. but a step further every day I am going to keep updating on this blog. And of course other interesting resources which I come across will be posted too ! :)

Screenshots of First Update are attached below. I know it sucks but these are the features I have just finished or they are being worked on for API release! And all this I have come up with in few hours of work today so I guess its a good start !

Features I can have finished:

1. Write alphabets2. Delete alphabets3. Change Font4. Change FontSize5. Clear All Text on the editor Pad.6. Change Color (Right now it just displays the standard Color, I want to do it more like Apple's color picker)7. Keyboard Appears and Disappears on user driven event.8. Pointer

Here are the few screenshots

Screenshot which shows text in another font

Here is the LINK to the post which mentions how to get the font family array for iOS

NSUserDefaults is generally used for storing information of an app with in application's sandbox. It comes very handy when you want to store very small amount of information. Like if you have a login screen and you want to store the username and password for next login for user's convenience, then its best to use NSUserDefaults ! I am going to tell you how you can do it.

To retrieve the values from these keys in NSUserDefaults anywhere in your application , on any view controller... you can just again create an instance of NSUserDefaults and use stringForKey or integerForKey

Tuesday, June 14, 2011

I found these 2 articles of good value. Enjoy them.
Basically they tell you how you can create .ipa file which is result of your ad hoc distribution build. These .ipa files you can drag and drop into your iTunes and sync.

Ok, this post talks about how you go about creating UIView with nib files and load them. Sometimes people have queries about it.. So I thought it will be cool to write about it.

1. You add new files in your project.

2. As usual, you select objective-C class to create a UIView.

3. You choose UIView

4.Pressing next will popup another window where you enter name of your UIView subclass. I named it MIMSearchStringTable.

5. After you press Save, you will view new UIView subclass files created in the project.

6. Now you add a nib file. Add new file in your project You choose User Interface > Empty

7. Choose whether it will be for iPhone or iPad.

8. Give the name of you nib file same as your UIView subclass files. I name them same as MIMSearchStringTable and Save.

9. Now I drag a "View" element on the right panel to my drawing area(square check area).

10. Press File's Owner as shown below. In right panel we have to set its owner. So under Custom Class, you see Class saying NSObject. We have to change it. Click on it and it will display the tableview with options available.

11. We have to make MIMSearchStringTable class as it owner. Hence we choose it.

12. Now you just go to your .m file and load nib file you just created by writing 2 lines as described in thisPOST HERE . They are same as shown below but you can copy them easily from my post whose link I have provided.Make sure you put the name in front of loadNibNamed: same as your nib file name.

13. Now we gotta put some UI elements in our nib file. I want to put a tableview. Hence I will make an IBOutlet in my .h file.

14. I go to my nib file where I had dropped the View Element from right panel. Now its time to drag and drop the TableView element from the right panel.

15. I can resize the Tableview. as well as my View.

16. As you can see here, I resized my View as well as its child TableView.

17. Now I make the connection as following.

18.After connection is made you will be able see that Table View is connected to IBOutlet I created in my .h file earlier.

19. Now I need to set my delegates and datasource for the TableView. Hence I selected the TableView by tapping on it gently in View.

20. On the right panel. I have to connect the datasource and delegate to File's Owner. I did this only because I am connecting UITableView. You will know it if you have experience of doing IB connections already.

21. You can change the rowHeight of the cell as shown below. Well your rows will appear short in height depends on your requirement if you need to set it or not.

And write your tableview delegate and datasource methods. Important ones are :

Live Feed

My Tweets

Goal to Open Source

I believe in open knowledge, hence I want to make this technology open source whatever I can on my blog. You can ask me to write about any particular mobile topic if you want. You can follow me on Twitter as well.