Saturday 25 April 2015

Experience at @Altimetrik 24 Hackathon on April 25 2015, Chennai

We +karthik prabhu  +Surendran S  +Tamil Arasan reached  +Altimetrik on April 24 7pm, organizers welcome with coffee , snacks and provided T-Shirts to all participants.....then started the event with all team introductions .. presented their presentation about the hackathon and motivated all teams to think like a entrepreneur to provide a prototype of the application. They given only one rule to the participants is  "There  is no rule" they made everyone to feel more comfortable with their environment  and we felt very more comfortable and happy.
 Given 5 real-world problem ideas to develop a prototype also given chance to develop our own idea prototype...
Had fun ....participants danced and sang a song ... +Surendran S sang minnale song..this fun activities made more cool and relaxed us to feel normal without nervous in a hackathon.
Had good dinner....
 All technical mentors, organizers interacted friendly and motivated us to create a innovative solution for the given problem. we selected smart digital visitor management problem and proposed our ideas to them , they encouraged us ...we planned to develop two iOS mobile app and one web app.We started the application with full of positive energy .... the whole night we coded...mentors and organizer cheer up and motivated the whole night without sleep...
Morning provided the freshup kits and good breakfast...
code...code....
Had good lunch....
Code code code .....completed...we prepared the presentation....and our prototype app is ready to demo...
Organizers make us to cool by giving presentation tips and appreciating...this helps us to remove our nervous and we were cool to given the presentation...
Our presentation and demo was successful.
Finally we got the winner title and price worth 30000 INR from +Altimetrik  president Mr.Ravindran   ......

This was a awesome experience in my career and looking for their next hackathon to hack


Winner price - flipkart coupon RS. 30000








Tuesday 19 November 2013

iOS7 navigationbar Color properties

How to change iOS7 navigationbar color

self.navigationController.navigationBar.barTintColor = [UIColor blackColor]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
self.navigationController.navigationBar.translucent = NO; 

Monday 21 January 2013

Gzip in Objective C

Reduce client side download time 

Gzip is a compression technique better than zip . The main advantage of gzip is to upload/download data from server to client quickly. All enterprise application uses XML or JSON and the size of the XML or JSON is very big and client side will take more time to download/upload data from server, to reduce the download/upload time GZipped data is needed.
   GZip compression will reduce download and upload time from server to client and client to server respectively.
Gzip will compress XML /JSON/ HTML data upto 60% ,so its very lighter on wire to download from client side.
To improve the performance of application, can send the gziped sqlite file from server to client, then its easy to download and use the sqlite directly.

GZip in iOS :-
https://github.com/nicklockwood/GZIP


Reference :-
http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/

Wednesday 3 October 2012

Difference between Nil , nil and NULL

Difference between Nil , nil and NULL


nil is a null pointer to an Objective-C object
Nil is a null pointer to an Objective-C class. 
NULL is  a null pointer to anything else
 Actually all the three have the numeric value of 0.
  • nil == (id) 0 
  • Nil == (Class) 0 
  • NULL == (void *) 0 

simply can say that nil is a pointer to an object
    for example : 
     NSArray *array = [NSArray arrayWithObjects:@"karthik", @"prabhu", nil];

Friday 28 September 2012

Types of Webservices

Big Webservice
     Big web service uses SOAP standard to communicate between client and server. SOAP is a XML based protocol running on top of HTTP. SOAP(Simple Object Access Protocol) is a communication protocol allow us to bypass firewall, main advantage is a platform independent and language independent.

   SOAP Message is a XML document
Four Tags in SOAP are
  • An Envelope (required) element that identifies the XML document as a SOAP message
  • An optional Header element that contains header information
  • A Body (required) element that contains call and response information
  • An optional Fault element containing errors and status information
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
<soap:Header>

</soap:Header>
<soap:Body>

  <soap:Fault>
 
  </soap:Fault>
</soap:Body>
</soap:Envelope>

WSDL (Web Services Description Language) is an XML-based language for locating and describing Web services.
     By using online tool http://sudzc.com/ we can convert our WSDL to ObjectiveC for iOS Project. This will automatically create and handle SOAP request , SOAP response respectively based on the WSDL.


RESTful Webservice
         REST stands for Representational State Transfer . RESTful web services are based on HTTP protocol and its methods are GET, POST,PUT and DELETE. REST is not a protocol and not a standard just a architecture style to communicate between client and server.

UIKeyBoard SplitView mode notification in iPAD

NSNotificationCenter is used to find the UIKeyBoard show or hide notification. From iOS5 can get the keyboard change notification (UIKeyboardDidChangeFrameNotification). Normally UIKeyboard have three modes are
 

  •        Dock
  •        UnDock
  •        Split


 Can find the keyboard show or hide notification by using name UIKeyboardWillHideNotification and UIKeyboardDidShowNotification for DOCK and UNDOCK mode.
In the split view, have to use UIKeyboardDidChangeFrameNotification to find the keyboard showor hide notification.


Register the notification in your  view controller to find keyboard changes in split view mode


[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];

NSString *version = [[UIDevice currentDevice] systemVersion]; 
    float version_float = [version floatValue];

        if( version_float > 5.0])  //use notification if system version iOS5 and above
            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShoworHide:) name:UIKeyboardDidChangeFrameNotification object:nil];

        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardDidShowNotification object:nil]; 


In the keyboardWillShoworHide method implementation have to check for the keyboard showing or hiding

BOOL wasKeyboardVisible;
- (void) keyboardWillShoworHide:(NSNotification *)aNotification
{
    NSDictionary* info = [aNotification userInfo];
    
    CGRect currentKbRect = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    CGRect screenRect = [[UIScreen mainScreen] bounds];
    
    BOOL keyboardVisible = CGRectIntersectsRect(currentKbRect, screenRect);
    
    if (keyboardVisible && !wasKeyboardVisible) {
        
     //keyboard visible
        
    } else if (!keyboardVisible && wasKeyboardVisible) {
    //keyboard hidden
    }
  
    wasKeyboardVisible = keyboardVisible;
   
}


Thursday 27 September 2012

How to Custom UIKeyBoard for UITextField


                          Custom UIKeyboard 


   UITextField contains two properties

   
       // set while first responder, will not take effect until reloadInputViews is called.
@property (readwrite, retain) UIView *inputView;             
@property (readwrite, retain) UIView *inputAccessoryView;


inputView


Can use our custom UIView instead of system keyboard by using inputView property, create your own  UIView and assign to the inputView property.
  
              yourtxtfield.inputView = yourCustomKeyboardUIView;  
      
can switch our custom keyboard and  system keyboard by using  reloadInputViews (Updates the custom input and accessory views when the object is the first responder)

  change custom keyboard to system keyboard

            yourtxtfield.inputView = nil;
            [yourtxtfield  reloadInputViews];

 change system keyboard to custom keyboard
    
            youttxtfield.inputView = yourCustomKeyboardUIView;
            [self.kbtxtfield reloadInputViews];

       
replaced system keyboard by our custom UIView

inputAccessoryView

Can add a toolbar like view on top of system keyboard by using inputAccessoryView property, create your own UIView and assign to the property.

              yourtxtfield.inputAccessoryView = yourCustomtoolbarlikeUIView;
       
added toolbar like view on top of system keyboard using inputAccessoryView




This sample describes how to add a toolbar(input AccessoryView) on top of system keyboard and how to add a custom keyboard by replacing system UIKeyboard. you can also switch between custom view and system keyboard ,this sample used xib for custom keyboardview and inputAccessoryView, also describes that how to use Custom UIView and  XIB UIView.


download source code : https://github.com/karthikprabhuA/CustomKeyboardInputView-Sample