Search Results

Search found 7394 results on 296 pages for 'sdk'.

Page 30/296 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Problem in displaying custom UITableViewCell

    - by Vin
    Hi All, I have a tableview displaying data using a custom UITableViewCell(say cell1). On touch of a row, I change the custom cell to another custom UITableViewCell(say cell2). Also I increase the size of row of the selected cell to accomodate, more items of cell2. My problem is that the approach works fine when the number of rows in table view is less. When the number of rows increses, the rows expand on touching, but the data displayed is same as that of cell1. Cell2 doesn't seem to be loaded at all. Looking forward for a reply soon....Thanks in advance.

    Read the article

  • iPhone KeyBoard Reposition

    - by NIL
    Hi all, I want to set position of keyboard when it appears. Can i set this using any API? I didn't want to use private API for that. Actually I want to display tab bar which is place d at bottom of screen.When keyboard appears then it hide the tab bar.So i want to set keyboard position at top of tab bar. Thanks in Advance.

    Read the article

  • Adding subview, gets delayed?

    - by user289510
    Hi, i didn't really know how to title this question, but here's a thing that really kills me: In my app i have a UITableView, UISegmentedControl and UINavigationBar. Once UISegmentedControl gets one of its segments selected i want to show a UIActivityIndicatorView on the UINavigationBar and then parse an xml file and present the results in a table. Everything works almost as i want it to, except one thing, the activity indicator view gets added to the uinavigationbar after the parser finishes, even though the method showLoading that adds UIIndicatorView to UINavigationBar gets before parser is initialised. Can anyone explain it? is there something i might be missing? maybe the ui needs to get redrawn? thanks peter

    Read the article

  • DTGridView losting content while scrolling

    - by Wim Haanstra
    I am using DTGridView from the DTKit by Daniel Tull. I implemented it in a very simple ViewController and the test I am doing is to place a button in the last row of the grid, which should add another row to the grid (and therefor moving the button to a row beneath it). The problem is, when I click the button a couple of times and then start scrolling, the grid seems to lose its content. As I am not completly sure this is a bug in the grid, but more in my code, I hope you guys can help me out and track down the bug. First I have my header file, which is quite simple, because this is a test: #import <UIKit/UIKit.h> #import "DTGridView.h" @interface TestController : UIViewController <DTGridViewDelegate, DTGridViewDataSource> { DTGridView* thumbGrid; } @end I declare a DTGridView, which will be my grid, where I want to put content in. Now, my code file: #import "TestController.h" @implementation TestController int rows = 1; - (NSInteger)numberOfRowsInGridView:(DTGridView *)gridView { return rows; } - (NSInteger)numberOfColumnsInGridView:(DTGridView *)gridView forRowWithIndex:(NSInteger)index { if (index == rows - 1) return 1; else return 3; } - (CGFloat)gridView:(DTGridView *)gridView heightForRow:(NSInteger)rowIndex { return 57.0f; } - (CGFloat)gridView:(DTGridView *)gridView widthForCellAtRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { if (rowIndex == rows - 1) return 320.0f; else return 106.6f; } - (DTGridViewCell *)gridView:(DTGridView *)gridView viewForRow:(NSInteger)rowIndex column:(NSInteger)columnIndex { DTGridViewCell *view = [[gridView dequeueReusableCellWithIdentifier:@"thumbcell"] retain]; if (!view) view = [[DTGridViewCell alloc] initWithReuseIdentifier:@"thumbcell"]; if (rowIndex == rows - 1) { UIButton* btnLoadMoreItem = [[UIButton alloc] initWithFrame:CGRectMake(10, 0, 301, 57)]; [btnLoadMoreItem setTitle:[NSString stringWithFormat:@"Button %d", rowIndex] forState:UIControlStateNormal]; [btnLoadMoreItem.titleLabel setFont:[UIFont boldSystemFontOfSize:20]]; [btnLoadMoreItem setBackgroundImage:[[UIImage imageNamed:@"big-green-button.png"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0] forState:UIControlStateNormal]; [btnLoadMoreItem addTarget:self action:@selector(selectLoadMoreItems:) forControlEvents:UIControlEventTouchUpInside]; [view addSubview:btnLoadMoreItem]; [btnLoadMoreItem release]; } else { UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(10,0,100,57)]; label.text = [NSString stringWithFormat:@"%d x %d", rowIndex, columnIndex]; [view addSubview:label]; [label release]; } return [view autorelease]; } - (void) selectLoadMoreItems:(id) sender { rows++; [thumbGrid setNeedsDisplay]; } - (void)viewDidLoad { [super viewDidLoad]; thumbGrid = [[DTGridView alloc] initWithFrame:CGRectMake(0,0, 320, 320)]; thumbGrid.dataSource = self; thumbGrid.gridDelegate = self; [self.view addSubview:thumbGrid]; } - (void)viewDidUnload { [super viewDidUnload]; } - (void)dealloc { [super dealloc]; } @end I implement all the methods for the DataSource, which seem to work. The grid is filled with as many rows as my int 'rows' ( +1 ) has. The last row does NOT contain 3 columns, but just one. That cell contains a button which (when pressed) adds 1 to the 'rows' integer. The problem starts, when it starts reusing cells (I am guessing) and content start disappearing. When I scroll back up, the UILabels I am putting in the cells are gone. Is there some bug, code error, mistake, dumb-ass-move I am missing here? Hope anyone can help.

    Read the article

  • Button outside view... how to make it work

    - by Mike
    I have a UIImageView based class that creates objects with the following characteristics: a small image square and a UITextView below. If the user drags the object by the image it can drag it around. If the user taps on the UITextView the keyboard has to appear and the user can change the text on it. The objects created by the class are like this: 1) the object creates a 60x60 pixels frame 2) puts an image inside that frame 3) creates a UITextView and puts it below that 60x60 frame. So, as the class is a UIImageView based and it creates an image with 60x60 pixels and the UITextView is located outside that area, in theory the text view is outside the area the tapping are for that object. Obviously I could make the class create a big square to encompass the image and the text view, but that frame would be too big and I have the objects created by this class to be as close as possible when I add them to another view. I could also create the text views from the same view I created the objects, but I would have to manage each object and each correspondent text view and I need them to move together... so, I have a problem. Any ideas on a simplest way to do that?

    Read the article

  • Why is my UIWebView not scrollable?

    - by Thomas
    In my most frustrating roadblock to date, I've come across a UIWebView that will NOT scroll! I call it via this IBAction: -(IBAction)session2ButtonPressed:(id)sender { Session2ViewController *session2View = [[Session2ViewController alloc]initWithNibName:@"Session2ViewController" bundle:nil]; self.addictionViewController = session2View; [self.view insertSubview:addictionViewController.view atIndex:[self.view.subviews count]]; [session2View release]; } In the viewDidLoad of Session2ViewController.m, I have - (void)viewDidLoad { [super viewDidLoad]; // TRP - Grab data from plist // TRP - Build file path to the plist NSString *filePath = [[NSBundle mainBundle] pathForResource:@"Addiction" ofType:@"plist"]; // TRP - Create NSDictionary with contents of the plist NSDictionary *addictionDict = [NSDictionary dictionaryWithContentsOfFile:filePath]; // TRP - Create an array with contents of the dictionary NSArray *addictionData = [addictionDict objectForKey:@"Addiction1"]; NSLog(@"addictionData (array): %@", addictionData); // TRP - Create a string with the contents of the array NSString *addictionText = [NSString stringWithFormat:@"<DIV style='font-family:%@;font-size:%d;'>%@</DIV>", @"Helvetica", 18, [addictionData objectAtIndex:1]]; addictionInfo.backgroundColor = [UIColor clearColor]; // TRP - Load the string created and stored into addictionText and display in the UIWebView [addictionInfo loadHTMLString:addictionText baseURL:nil]; // TODO: MAKE THIS WEBVIEW SCROLL!!!!!! } In the nib, I connected my web view to the delegate and to the outlet. When I run my main project, the plist with my HTML code shows up, but does not scroll. I copied and pasted this code into a new project, wired the nib the exact same way, and badda-boom badda-bing. . . it works. I even tried to create a new nib from scratch in this project, and the exact same code would not work. Whiskey Tango Foxtrot Any ideas?? Thanks! Thomas

    Read the article

  • How do I open iPhone camera and restrict to a frame?

    - by Thomas
    Hello All: I'd like to know how to open the camera inside of a pre-defined frame (not the entire screen). When the view loads, I have a box, and inside it, I want to display what the camera sees. I don't want to snap a picture, just basically use the camera as a viewfinder. I have searched this site and have not yet found what I'm looking for. Please help. Thanks! Thomas

    Read the article

  • How to write test cases for drawing text / string in a box ?

    - by Madhup
    Hi, I am drawing strings in a rectangular frame. The string is drawing perfectly. Now I need to write test cases using sentesting kit. I have no ideas from where I should start. For help I have also seen the iPhone sample calculator application But still out of sorts. Any body having ideas please help. Thanks, Madhup

    Read the article

  • Nike + iPod app like customisation ?

    - by Madhup
    Hi, I am very much curious about Nike + iPod app look and feel. They have selected uitabbar buttons red in color The tableviewcell selection style as red in color. The disclosure indicator is also red in color. The solution in my mind for two of these is: I can use a red colored arrow image to use it as accessory view. I can flip between a red colored and white colored view with animation for having the selection style But I am clueless of how the tabbar thing is to be done. I am very curious to know the tricks behind this, I also accept that I may be wrong with my other two solutions. So please suggest the solution for any of the problems. I think all are worth knowing for the developers. Thanks, Madhup

    Read the article

  • wrong interface orientation or unknown

    - by Mike
    The problem is this: I put the simulator in landscape I start the app The app is unable to detect the correct orientation, always unknown! I have created a sample project that demonstrates the problem I have. Take it here How can I solve that? thanks

    Read the article

  • I need to display users current location as text

    - by Taylor Satula
    Hi, I am new to iPhone development and really have no idea how to do what I am trying to implement. Here is my problem, I need to display the users current street and city as text in my iPhone app (See picture). I have seen many posts on stack overflow and other websites about how to do this but they are all just code examples. As I said before, I am a extreme beginner. I just need to show the MKReverseGeocoder and its output as text in my application. If someone could walk me through how/where to create the ReverseGeocoder and how to make it show up in my application I would be extremely grateful. I have searched for hours trying to find a beginner example but alas I cannot find one that lays it out step by step. I hope this can help me out.

    Read the article

  • Looping through values in NSDictionary throws fault

    - by jud
    I have a plist file that I am loading into an NSDictionary *setDictionary that contains a set of fields, pictureDesc1, pictureDesc2, etc. Once the NSDictionary is loaded, I can retrieve a value using [setDictionary objectForKey:@"pictureDesc1"]; But I cannot do a loop like this: for (int i=1; i<=numberOfPictures; i++) { NSString *keyName = [NSString stringWithFormat:@"pictureDesc%d",i]; NSString *description = [NSString stringWithFormat:@"%@", [setDictionary objectForKey:keyName]]; } Is there a different way to dynamically call keys from within an NSDictionary?

    Read the article

  • ipad simulator - sandbox area

    - by Mike
    Every iPhone/iPad application has its sandbox area, where I can store files. When I use the simulator this area will be somewhere in the hard disk. Is it possible to see this directory and its contents for a given application? I am debugging an iPad app and it will be a lot easier if I can see the sandbox area contents in real time, as the app runs and creates files there. Where do I find it? thanks for any help.

    Read the article

  • ipad simulator rotating

    - by Mike
    I am testing an application on iPad Simulator and I need it to start my app in the position the simulator is but every time I run the app, the simulator rotates the simulator to portrait. Is there a way to stop this behavior? thanks.

    Read the article

  • grabbing layer contents in a class

    - by Mike
    I have a custom UIImageView class that creates thumbnails (UIImageView) and each thumbnail has a label. The label is created by another class. The label class creates a UIImageView and a UITextView on top of it. This is the init object class' init method: - (id)initWithFrame:(CGRect)frame { if ([super initWithFrame:frame] == nil) { return nil; } CGRect myFrame = CGRectMake(0, 0, 100, 100); myLabel = [[myLabelClass alloc] initWithFrame: myFrame]; //myLabelClass is a UIImageView based class [myLabel setCenter:CGPointMake(50, 50)]; [self addSubview: myLabel]; return self; } So, I have this MAIN VIEW CONTROLLER | |___ UIImageView WITH LABEL | |____ label background (UIView) |____ UITEXTVIEW (text) Now I want to write the contents of all these 3 components to a quartz context. I need to write using drawInRect, because I need to write the full object to a precise location. I expected object.layer.contents to be the image equivalent to these 3 "layers" flattened, in other words, the object's image, the label background and the label text, as it would if I created these 3 objects in Photoshop and flatten the composition. I also expect object.myLabel.layer.contents to contains the rendered contents of the UITextView over the label background. The problem is that when I use UIImage *myImage = [UIImage imageWithCGImage:objecto.myLabel.layer.contents]; [myImage drawInRect:CGRectMake(0, 0, 100, 100)]; I get nothing. How can I obtain a "flattened" image resultant to the full object (including its subviews)? thanks

    Read the article

  • change launch image(default.png)??

    - by hemant
    i am quite new to iphone development but i have been given a old application and told to change the launch image(default.png)..i tried to google it but couldn't get much help from it?? how can i change the default image in my old application?? any information regarding it will be really helpful??

    Read the article

  • xcode - defining integer variables

    - by Mike
    If I have #define myVariable 10 and later I use this as in [self doSomething:myVariable]; Supposing doSomethign method is like - (void) doSomething:(int)myNumber; I receive a warning telling me that a "]" is expected before the ";" why is that and how to solve this? thanks for any help.

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >