skip to Main Content
+971 55 881 1725 hmimthiaz @ imthi.com

To create rounded rectangular views using iPhone SDK

To create view with rounded corners is really simple in iPhone SDK 3.0 in just 2 steps

Step 1: Include QuartzCore

Step 2: You can now add corner radius to any view

Sample Code: Click to download. In the sample I have done a image view and a loading view with rounded corners. This sample will work only with iPhone SDK 3.0 and above.

If you had got the chance to look at iPhone SDK 3.2 beta you will be surprised to see more exciting stuff that is been added to CALayer 😀

Add UIActivityIndicatorView to UINavigationBar

For me it took sometime to figure out how to show activity indicator in the navigation bar. Later I found it was very simple. When you push a view to the navigation you get to play with navigationItem property on the view that is being pushed. In your viewWillAppear method you can add this code.

I have done a sample application demonstrating this code. It is based on iPhone navigation project template. In the application I have two action to start and stop the animation.

Screen shot of the application

Activity indicator on navigation bar

Download Load Activity Indicator Xcode project files.

iPhone RSS Reader Application with source code

I am really happy to release my first iPhone application source. This is a simple RSS reader application and it loads the latest news from BBC.

While doing this application I got to learn and to get a rough idea bout the following

  • How basic iPhone application works
  • View & view controllers
  • Tableviews, Tableview Datasource & Tableview Delegate
  • Navigation controller
  • Threading
  • XML parser etc

.
To make this application I have broken my head reading lot of samples and watching video tutorials. I am very sure the application will have lot of issues and mistakes. If anyone feels so please give me a comment So I have a chance to correct myself. So far I find it really interesting and challenging 🙂

Application Main View : This view loads the RSS parser as a thread, this will download the RSS and parse it. Once the thread is completed it loads the RSS item into a UITableView.

Rss Reader Main View

News detail View : Based on what news is selected it loads the detailed news view.

Rss Reader Detail View

Alert View: Gives you a choice if you want to open the RSS item in safari browser.

Rss Reader Open Link View

Please forgive me for not putting the complete explanation about the application. I am sure it is pretty simple to figure it out.

Download iPhone RSS Reader Application Source Code

Leopard + Apache 2 + NTLM + PHP + Integrated Windows Authentication

Everyday we face lot of challenges and today it was to make our CMS work with NTLM(NT LAN Manager Windows authentication protocol) Single Sign-On. I hope you didn’t get any shit what I meant above and so was I when I got the requirement.

In windows network we can connect all computers to a domain and it will have a domain controller. Once your computer is connected to the domain you will be asked enter your domain user name and password when ever you log on to system. After you log in it will use the same credentials to authenticated all the domain related objects like network, files, exchange and so on. In most of the corporations this how they manage the systems with group policies applied to each users.

In Internet explorer there is a feature to use the same credentials to authenticate intranet websites. This is Single Sign-ON. There is very nice article which can help you if you want to set it up.
internet-explorer-authentication-setting

So my application should be able to detect whether the browser is authenticated already or raise if needed and it will validate the credential with domain controller. There is no direct methods available in PHP to achieve this. So to achieve this I had to rely on NTLM auth module for Apache. It was pretty outdated and Raimonds Simanovskis has updated the source tree and had released a patched version here. I was able to compile it without any issues. Download and extract the files and run this.


#sudo /usr/sbin/apxs -i -a -c mod_ntlm.c
...
Libraries have been installed in:
/usr/libexec/apache2
...
chmod 755 /usr/libexec/apache2/mod_ntlm.so
[activating module `ntlm' in /etc/apache2/httpd.conf]

Most important part adding ntlm module to Apache is done. The next step in make some some modification in htaccess file. Configuration setting can be read in detail from here.

AuthName NTAuth
AuthType NTLM
NTLMAuth on
NTLMAuthoritative on
NTLMDomain DOMAIN-NAME
NTLMServer SERVER1
NTLMBackup SERVER1
NTLMLockfile /tmp/_my.lck
require valid-user

Make sure that the computer where you have installed apache should be able to connect to domain controller. Always use full domain names and not IP as it will give errors while connecting [reference] . You are fully set now and if everything is correct you will get these variables in PHP with current logged in details.


$_SERVER['AUTH_TYPE'] => NTLM
$_SERVER['REMOTE_USER'] => xxxxx
$_SERVER['REMOTE_PORT'] => xxxx

I have tested this with Internet explorer and it will work without asking password. For other browsers like Firefox, Chrome, Safari it will prompt for authentication. Thats all folks 😉

WordPress PDA plugin causing header output issues

If you have upgraded the PDA plugin in past 2 days you might run into header output issues which might break the operation of wordpress where ever header function was being used.

To overcome the issues please de-activate the plugin and upgrade the plugin to the latest version 1.2.6 and activate the plugin back.

This error was due to some unwanted junk character present in the beginning of the file. It was due to the editor issue which I had used to save the file and commit the file to the repository.

I am really sorry for causing this issue and sorry for the inconvenience  caused 🙂

Back To Top