iphone-sdk-3.0

Top margin on UITableViewController

六眼飞鱼酱① 提交于 2019-12-02 17:26:39
I have a TabBarController, one of the tabs of which contains a sub view which is a navigationController. I am then loading into the navigation controller a view which inherits form UITableViewController. My problem is thta for some reason the table view starts behing the navigation controller, not the top of the screen but about half way down the navigation bar, hence the top of the first cell in the table view is cut off. Can anyone suggest how to move the UITableViewController down? Fix it programmatically: - (void)viewDidLoad { UIEdgeInsets inset = UIEdgeInsetsMake(20, 0, 0, 0); self

UITableViewCell transparent background (including imageView/accessoryView)

二次信任 提交于 2019-12-02 17:20:15
When I set the UITableViewCells backgroundColor to a semi-transparent color, it looks good, but the color doesn't cover the entire cell. The area around the imageView and accessoryView are coming up as [UIColor clearColor] ... I've tried explicitly setting the cell.accessoryView.backgroundColor and cell.imageView.backgroundColor to be the same color as the cell's backgroundColor , but it doesn't work. It puts a tiny box around the icon, but doesn't expand to fill the left edge. The right edge seems unaffected by this. How can I fix this? EDIT : Here is the raw table cell code: -

UITableView page size when paging enabled

一笑奈何 提交于 2019-12-02 17:18:34
I'm facing with a simple but tedious problem. What I'm trying to do is make an UITableView to page like an UIScrollView but enabling paging doesn't help me so much because I can't set page size so the tableview scrolls exactly of its height so it shows rows 1...10 or 11...20 and so on. What I'd like instead is that no cell remains clipped above or under the view when I scroll (thus paging) without having a sort of fixed range of shown cells. Thanks a lot More simple and more efficient :) - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{ if(decelerate)

sending data to previous view in iphone

一个人想着一个人 提交于 2019-12-02 17:07:51
问题 What are the possible ways to send data to previous view in iphone. Without using Appdelegate. Because there are chances for my view class to be instantiated again. 回答1: There are several ways to achieve data sharing, with Singleton Objetcs being one of the most popular: Objective C Singleton 回答2: I believe the best approach is using the NSNotificationCenter class. Basically what you do is register an object (as an observer) with a notification center. So for example if you have objects A and

JSON to Persistent Data Store (CoreData, etc.)

断了今生、忘了曾经 提交于 2019-12-02 16:32:15
All of the data on my application is pulled through an API via JSON. The nature of a good percentage of this data is that it doesn't change very often. So to go and make JSON requests to get a list of data that doesn't change much didn't seem all that appealing. I'm looking for the most sensible option to have this JSON saved onto the iPhone in some sort of persistent data store. Obviously one plus of persisting the data would be to provide it when the phone can't access the API. I've looked at a few examples of having JSON and CoreData interact, for example, but it seems that they only

Password protect iPhone app

自古美人都是妖i 提交于 2019-12-02 16:32:07
I'm starting a new app, and I'd like to know how to require a password to open it. I was considering a UIActionSheet in the application didFinishLaunchingWithOptions method of the app delegate implementation file, but am unsure how to go about doing so. I'm going to keep trying though. Found this video , which seems pretty helpeful. Now I've got my UIActionSheet to pop up displaying "Enter password," and am trying to figure how to add a keypad to the action sheet. pendor I think you may have better luck using a full UIViewController instance instead of a UIActionSheet . Adding keyboard

Core Text examples for iPhone/iPad

不打扰是莪最后的温柔 提交于 2019-12-02 16:01:28
I am looking for a Core Text example for iphone/ipad but with little luck. Any leads would be appreciated. I have written a small project on Github that provides an Objective-C wrapper for Core Text: https://github.com/akosma/CoreTextWrapper In particular, it takes any string and renders it over multiple pages, with multiple columns each page. Hope it helps! You can find an example of column layout tweaked to work with iPhone/iPad here: http://foobarpig.com/iphone/coretext-example-column-layout-with-correctly-inverted-text.html kennytm Core Text is a public framework on the Mac OS X. Any

How do I add multiple columns in my table in iPhone SDK?

岁酱吖の 提交于 2019-12-02 15:01:40
问题 How do I add multiple columns in my table in iPhone SDK? Any help would be highly appreciated. 回答1: Currently UITableView doesn't have the support to have multiple columns in table view cell. So, you can not add multiple columns in UITableView. But there are some alternates, like drawing custom grids on table view cells. Have a look at this post.. iPhone Multiple Columns in UITableView.. This link http://usxue.is-programmer.com/posts/14176.html has the code.. 来源: https://stackoverflow.com

table reloadData not working

若如初见. 提交于 2019-12-02 15:01:26
问题 i am using following code to delet a row from tableview as well from db , the row is delted from the db at once but its not delted from the tableview till i back back and th chk aggain ,i want when i delet the row tableview should rload the data... any idea ? -(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { [self.table beginUpdates]; if (editingStyle == UITableViewCellEditingStyleDelete) {

iPhone's NSUserdefaults is a database or plist

给你一囗甜甜゛ 提交于 2019-12-02 12:40:23
问题 I am not able to get NSUserDefaults concepts properly. Is that a database of plist file ? 回答1: It's a key-value store that is persisted between restarts of your application. How it's implemented has little bearing on how you use it. 回答2: I don't know if it's different on the iPhone OS (which i don't believe) but in Mac OS X is it a plist file in your Library/Preferences folder. Pretty sure it's the same on iPhone OS/iOS 来源: https://stackoverflow.com/questions/3178115/iphones-nsuserdefaults-is