Archive for the ‘ iPhone ’ Category
This tutorial gives you an idea on how to send emails in objective c with attachments. First we are aware that iPhone has this capablities already. But the question is how could we be able to use this feature in our own applications? Here is the answer: read. Anyway, there are two ways to implement [ READ MORE ]
This is how you call your UITablewVieCell class inside your - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath. (Considering that you were using a NIB – viewbased). static NSString *CellIdentifier = @"Cell" CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) NSArray *cellObject =[[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:nil options:nil]; for(id currentCell in cellObject) { if([currentCell isKindOfClass:[UITableViewCell class]]) [ READ MORE ]
This post helps you with pushing or presenting modal views from a uiviewcontroller. There were two ways to do this. First is Without using a NIB. (just a UIView class) See Code below. // Implement loadView to create a view hierarchy programmatically, without using a nib. - (void)loadView { test1View *m_test1View = [[test1View alloc] initWithFrame:[UIScreen [ READ MORE ]
First of all, make sure that your UITextField object has delegate reference to the Files Owner and included the Delegate class <UITextFieldDelegate>. Then you could use this code below. - (BOOL)textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return NO; } Enjoy[ READ MORE ]
Before we start with sample code using NSScanner, let us have a quick over of NSScanner from Apple. The NSScanner class is an abstract superclass of a class cluster that declares the programmatic interface for an object that scans values from an NSString object. An NSScanner object interprets and converts the characters of an NSString [ READ MORE ]
In order to fetch decimal digits from charater set of your NSString. You need to Trim the String then invert the set of decimal digit character set. See example below which returns value 20. NSString *mString = @”My number is 20″; NSString *digitsString = [mString stringByTrimmingCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]]; NSLog(@”Decimal Value: %i”, [digitsString intValue]); Happy Coding[ READ MORE ]
- (NSString *)flattenHTML:(NSString *)html { NSScanner *theScanner; NSString *text = nil; theScanner = [NSScanner scannerWithString:html]; while ([theScanner isAtEnd] == NO) { // find start of tag [theScanner scanUpToString:@"<" intoString:NULL] ; // find end of tag [theScanner scanUpToString:@">" intoString:&text] ; // replace the found tag with a space //(you can filter multi-spaces out later if you [ READ MORE ]
Other useful JavaScript methods: self.find(<string>); – navigates to the next occurrence of a string window.pageYOffset; – basically tells you the scroll position of the webview window.scrollTo(x, y); – allows you to effectively set the scroll position window.getSelection(); – fetch the highlighted strings in the webview. Happy coding[ READ MORE ]
Posted a more detailed tutorial to my other blog. See here: http://zaldzbugz.posterous.com/how-to-mark-or-get-the-highlighted-string-ins[ READ MORE ]
How to build an app for appstore submission. 1. Make sure you already installed the appstore distribution profile. 2. In your build settings, duplicate the Release configuration build setting and rename it to Distribution. 3. Add the Entitlements.plist to the project under the Distribution target. 4. In the build settings, under Code Signing Entitlements, write [ READ MORE ]
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Join 4 other followers
Get every new post delivered to your Inbox.