Improve performance while using shadow/glow using layers

Whenever using layers to add shadow, add rounded corners, show border or anything, just remember to set “shouldRasterize” property of a layer object to YES, default value is NO. self.layer.shouldRasterize = YES; This is what header file says about “shouldRasterize” property. When true, the layer is rendered as a bitmap in its local coordinate space (“rasterized”), then the bitmap is composited into the destination (with the minificationFilter and magnificationFilter properties of the layer applied if the bitmap needs scaling). Rasterization occurs after the layer’s filters and shadow effects are applied, but before the opacity modulation. As an implementation detail the…

resourceURL equivalent before iOS 4

[[NSBundle mainBundle] resourceURL] is same as [NSURL fileURLWithPath:[[NSBundle mainBundle] resourcePath]] I need to use it a lot while making local html pages to show in UIWebView. Just to remember. :-)

Call iOS method for HTML button click

We can use custom urls for this purpose, Lets say we want to add a button1 into HTML page and we want to call “-didTapButton1” when user taps on button1. We should have following code into HTML page that we are loading into UIWebView, <a href="didTap://button1"><img src="button1.jpg" /></a> Now next what we need to do is add methods from UIWebViewDelegate (To call this method the method owner needs to be the delegate for the UIWebView used), - (BOOL)webView:(UIWebView*)aWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType { NSString *absoluteUrl = [[request URL] absoluteString]; if ([absoluteUrl isEqualToString:@"didTap://button1"]) { [self didTapButton1]; return NO; } return YES; } And…

Why Service Providers should not get into retail app market

Gone are the days when individual developers or small companies used to make mobile apps, no one was really interested into mobile app system. And it all changed with iPhone App Store. People started thinking seriously about mobile apps as a business. Still when iPhone App Store was just released very few developers and small companies were into the serious app making business. Small companies got good stardom, users and money making opportunity with it. Whats good about these indi developers and small organizations that they did not get stardom by selling apps, they got that stardom by selling those…

Twitter should implement dialog based posting

I added this subject to the blog long time ago..some feb or something, I was gonna write a module that does the job but now…i dont think its required anymore ( this made me sad though :(, i didn get time to write that code ) since iOS5 has nice and beautiful tweet poster inbuilt into the OS. Its a delight!! ( Anyways i can write that code still! )

Read XML attributes in libxml SAX parser

Adding following lines in startElementSAXFunc method, and we can use attributes string keys and values as following. for (int i = 0; i < nb_attributes; i++) { NSString *key = [[NSString alloc] initWithCString:(char*)attributes[0] encoding:NSUTF8StringEncoding]; NSString *value = [[NSString alloc] initWithCString:(char*)attributes[3] length:attributes[4] - attributes[3]]; NSLog(@"%@ = %@", key, value); [key release]; [value release]; attributes += 5; }

mundu IM Pro launched…

I was just too busy working on some cool iOS apps past few days. Adding some new UI tweaks, performance and other improvements to existing mundu IM Pro app. And finally we have sent update to the apple, Should get approved in few days. ( mundu IM has never got rejected in the past. :) ) http://twitter.com/#!/davinc/status/25094282717167616 For more info about “mundu IM Pro” on iPhone, please visit, http://itunes.apple.com/in/app/mundu-im-pro/id407228604?mt=8 or follow @munduIM Follow @munduIM for free promo codes.

RSS Reader the way I need it…

Generally every person who is net freak starts his day by going through his RSS feeds. People like me, subscribe to many RSS feeds about programming, iPhone & Apple tech, Usability and stuff. Everyday I have about 30 unread articles in my reader app (I use NetNewsWire on mac). People start going through these articles and they really end up reading only small percentage of those unread, Usually only 5-6 out of 30. As most of the Articles are about same thing, same news, same product explored or smashed. Thats where the problem begins. What people want to read at…

Saare Jahan Se Accha Tabs

On Our Republic Day…This is the only song that comes to my mind, really sounds too good on electric guitar. Saare Jahan Se Accha ---------------------- 4--------------------- ---7--5-7---4--5--5--- ---------------------- ---------------------- ---------------------- Hindostaan Hamara... ----------------------------- ----------5-6-5-5---6-5------ -----5--7---------7-----7-5-- 5--7------------------------- ----------------------------- ----------------------------- Hum Bulbule Hai Isaki -----------------5------ --6-8---8-8-5--6---8---- 7----------------------- ------------------------ ------------------------ ------------------------ Yeh Gulsitan Hamara Hamara.... ------------------------------- 5-6-8--6----------------------- ----------8--7-5-5--5-5-4------ --------------------------7-5-- ------------------------------- ------------------------------- Enjoy playing the tune…

NSDate and Sqlite3 in iPhone

While working with NSDate and sqlite3 on iPhone the common problem many people face is about storing and retrieving NSDate from sqlite3 database. There are mainly two methods to do so, one is to get the time interval (timeIntervalSince1970) from reference date and save the interval as double value in the database, second is to convert date into string using NSDateFormatter and save the text value in the database. NOTE: The type of column where we want to store NSDate should be DATETIME in both the methods. Method 1: using timeIntervalSince1970 Writing NSDate to sqlite3 DB NSDate *dateToWrite = [NSDate…

Kal Ho Naa Ho (tabs)

These are the tabs for one of my all time fav song. Tuned up my guitar and played it after real long time. E-------------------10-8------------------ 2 times B--11--10-11-10-11-------11-10--8-10-8-10- E------6^------------------6^------------- B--6-8----8----6-8~-6--6-8----8--9-8---6-- G------------8-----------------------8---- E-------------------10-8------------------ 2 times B--11--10-11-10-11-------11-10--8-10-8-10- E-------11-10-8---------------------11-10-8------------------ B-10-11---------11-10-10-11~---10-11---------11-10-10-11-86- E------6^------------------6^------------- B--6-8----8----6-8~-6--6-8----8--9-8---6-- G------------8-----------------------8---- Thanks and enjoy the song…. :)

How to enable emoji on iPhone (programatically)

Emoji is the Japanese term for the picture characters or emoticons used in Japanese wireless messages and webpages. Originally meaning pictograph, the word literally means e “picture” + moji “letter”. The characters are used much like emoticons elsewhere, but a wider range is provided, and the icons are standardized and built into the handsets. The three main Japanese operators, NTT DoCoMo, au and SoftBank Mobile (formerly Vodafone), have each defined their own variants of emoji. Ok enough of this….Lets see how to enable this keyboard to be used everywhere. (By default this keyboard is only works on iPhones from Japan)…

Flipping bar button like iTunes

This is the example for how to create flipping bar button like iTunes. I faced the same problem while developing solutions for first time, after looking at iTunes app more closely..it seems the flipping thing in Navigation Bar is not a BarButton but button with images ( It does not show highlighted effect ). All we need to do is use custom UIBarButtonItem with CustomView for this. Step 1: Create UIBarButton with CustomView barButtonSuperView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 34, 30)]; barButtonPrimaryView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 34, 30)]; UIButton * primaryButton = [UIButton buttonWithType:UIButtonTypeCustom]; primaryButton.frame = CGRectMake(0, 0, 34,…

UITableViewCell Selection

I have seen many many applications so far, i mean really awesome applications. Still one thing i see which is almost common with all of them except few one is that Custom UITableViewCells does not change text color when selected/highlighted. I am also a developer and i know these kind of things miss out while developing applications in rapid development cycles and under timeline pressure :(. but then it really shows high level of ignorance from developers side. The solution is simple. Generally what we do is we create custom UIView and add it inside UITableViewCell. Just we need to…

Socha hai – Rock On tabs

I didn find good tabs for it anywhere so here i am posting my own version… PART1 E--5---------------------------------------------------- B--7--------------------------3--------------2-3-------- G--7------4~----4-6-7---------2--0-2-4-----4-----2h4p2-- D--5--5-7-------------7h9p7~~--------------------------- A--5---------------------------------------------------- E--5---------------------------------------------------- PART2 E------------------------------------- B---3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3--- G----2-2-2-2-0-0-0-0-4-4-4-4-2-2-2-2-- D------------------------------------- A------------------------------------- E------------------------------------- PART1 & PART2 together 2 times D aasma hai neela kyun Bm paani geela geela kyun G A gol kyun hai zamee D silk mein hai narmi kyun Bm aag mein hai garmi kyun G A do aur do paanch kyun nahi .. and so on

YMSG16 Authentication

The new Yahoo messenger v9.0 uses ymsg 16 protocol. For login process client sends username and password to yahoo login server: https://login.yahoo.com, and in response server sends Token which is then used for client authentication process on scs.msg.yahoo.com:5050 This login process goes through multiple steps as follows.. Step 1: Send username and password to login server Https request url: https://login.yahoo.com/config/pwtoken_get?src=ymsgr&login=<username>&passwd=<password> Https response and meaning: Invalid username  : 1235 Wrong password  : 1212 Information Valid : 0 ymsgr= <token>partnerid=<pid> data is used in step 2 for further processing. Note: and seem to appear in pair for given username and password Step…

I’ll always remember…

Firstly, I would like to talk about the first year; there is lot to say about. I was in some other college then I got admission here, in Watumull. Those days were so different than today’s. I was one unknown guy in that class. I still remember, our class was on the fourth floor first room – a ‘window-class’ with very beautiful view of the sea face. In all labs chintu, saili, pappu, neha n me were in one group. Always these girls used to do all calculations n we all guy used to copy those things. We were together…