hi all i've submit my app to approval process, my app is in review, when go see the details i see that to "Bundle short string" or something similar is empty.
Will it be rejected ? ?
thanks
I made a UITableViewCell subclass, and now I want that subclass to be "clever". It should align it's contents to the height of the row. But for this, the cell must know what height value was provided for it in this method:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
However, no matter what value I assign here, my cell's frame is 44 px height at initialization time (default style). Is there any way I can get that value from the cell at initialization time?
- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
self.title = @"Library";
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStyleBordered target:self action:@selector(close:)];
self.tableView.rowHeight = 80;
}
-(void)close:(id)sender
{
//
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{ cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
UILabel *dateLabel = [[UILabel alloc]init];
dateLabel.frame = CGRectMake(85.0f, 6.0f, 200.0f, 20.0f);
dateLabel.tag = tag1;
[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
cell.contentView.frame = CGRectMake(0.0f, 0.0f, 320.0f, 80.0f);
[cell.contentView addSubview:dateLabel];
[dateLabel release];
}
// Set up the cell...
//[(UILabel *)[cell viewWithTag:tag1] setText:@"Date"];
cell.textLabel.text = @"Date";
return cell;
}
But the control is not entering into the tableView: method. So I could not see any label in my table. How can I make this ?
Thank You
Hi,
I have a NSMutableArray with a few NSString objects in , how can i test if
it contains a particular string literal
i tried [array containsObject:@"teststring"] but it doesn't work.
Thanks
I have a UITableView with 3 sections. In the first section I have 2 grouped cells. I am modifying the first cell to be larger than the second. Though the first cell resizes, it seems to mess up the cell below it. How can I resolve this?
- (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
CGFloat rowHeight;
if(indexPath.section == kBioSection) {
switch(indexPath.row) {
case kBioSectionDescriptionRow:
rowHeight = 100;
break;
}
}
else {
rowHeight = 50;
}
return rowHeight;
}
I'm having the most bizarre problem which I'm not even close to figuring out. I have a button which fires a delegate method. Once upon a time it was working fine, but after making some changes to my code, now the delegate method only fires after I push the button x amount of times (the changes I made to the code had nothing to do with the infrastructure that connects the delegate together). It varies, it can be 5 times to 10 times. I used the analyzer to check for memory leaks and there aren't any.
There is too much code for me to paste here (I don't even know where to start or where the problem could be), but I'm wondering if anyone has experienced this problem before, or what could be causing it? This is very odd and have no clue what could be causing it.
Hi, i'm looking for answer about getting latitude and longitude from uimapkit. there is same problem that has been answered, but it didn't give right coordinate. http://yit.me/3ddp73
it's code from thread i'm linking above.
CLLocationCoordinate2D topLeft, bottomRight;
topLeft = [mapView convertPoint:CGPointMake(0,0) toCoordinateFromView:mapView];
CGPoint pointBottomRight = CGPointMake(mapView.frame.size.width, mapView.frame.size.height);
bottomRight = [mapView convertPoint:pointBottomRight toCoordinateFromView:mapView];
NSLog(@"topleft = %f", topLeft);
NSLog(@"bottom right = %f", bottomRight);
any idea to fix this issue ?
thanks
I am trying to download a list of files from a ftp server using:
NSURL *ftpUrl = [NSURL URLWithString:@"ftp://xxx:[email protected]"];
I HAVE to use FTP, so please do not recommend an alternative. I want to know how to get the list of files from the root directory and also navigate inside folders (of FTP server).
P.S: I do not think external library would be required to accomplish such an easy task, but if I must, any recommendations would be appreciated.
Thank You :)
I have a UITableView with a custom header that maintains some state. When I call reloadData to change/update the data in the UITableView, the header gets reloaded too. Is there any way to prevent this behavior in order to maintain state in the table's header?
I hope someone understands what happens to my NSMutableArray.
I read records a, b, c, d from a database, load the fields into an object an add the object to an array. To do this I read the records into an instance of that object (tmpEvent) and add the Object to the target array (NSMutableArray myArray).
the code looks like:
for (condition) {
tmpEvent.field1 = [NSString stringWithUTF8String:(char*)sqlite3_column_text(stmt, 0)];
tmpEvent.field2 = [NSString stringWithUTF8String:(char*)sqlite3_column_text(stmt, 1)];
tmpEvent.field3 = [NSString stringWithUTF8String:(char*)sqlite3_column_text(stmt, 2)];
NSLog(@"myArray: adding %@", tmpEvent.field1);
[myArray addObject:tmpEvent];
}
The NSLog shows
myArray: adding a
myArray: adding b
myArray: adding c
myArray: adding d
Subsequent I enumerate the array (this can be in the same or a different method):
for (myObject *records in myArray) {
NSLog(@"iEvents value %@", records.field1);
}
The NSLog now shows:
myArray value d
myArray value d
myArray value d
myArray value d
a mystery .... ??? any thoughts?
Hello
I have looked around and found some code which so called chooses an image from an array of image objects, but cant find an explanation.
I would like to make my app have a background image and the user can select next and previous buttons to scroll through some full screen images, setting them as the background image as they scroll.
I know how to do this in java, but cant seem to do it for this app.
How or what code is linked to a next button to grab the next image in the array and reverse for the back button?
Then that needs to be displayed obviously.
I have used a layered architecture with a MVC style approach but cant seem to put it together with Objective-C.
Would the buttons call the appropriate methods of the so called delegates, which the delegates handle fetching and returning the Images?
Would the buttons use the returned images and actually handle the redrawing?
I would really appreciate the help.
Regards
Jarryd
I have a detail page of type UIScrollView. On it I want an optional UIImageView and a mandatory UITextView. If no image is available then the image view should not take any space. The text for the text view can be of varying sizes.
When the view is loaded with, say, the image and the text I need to be able to scroll through all the contents. So the image slips off the top of the screen.
I just can't get this work and I feel it ought to be easy. Any ideas?
I am having code
NSString *cellValue1 = [products1 objectAtIndex:indexPath.row];
when i try to print NSLog(@"cell value is %@",cellValue1);
in log i am not getting anything,
if i use %s, i am getting some symbols, not the string located in cellValue1.
Please help me.
Thanks in advance.
Hello all,
I am storing the images in database. I get the NSData and create an image from it. Now I want to crop or draw a smaller image of the existing image in database which I am getting from the querry. I dont want to cache the images since I am using them in bulk and want to release them as soon as the view being displayed where the images are used is popped up.
Is there any efficient solution to make sure that images dont consume memory at the background once their use is over...
I will appreciate the lines of code for this.
Tnx in advance.
I have the following code with adds a navigation controller to a modal view. The nav bar and view all appear ok, but the right button does not. What am I doing wrong?
UpgradesViewController* upgradesViewController = [[UpgradesViewController alloc] initWithNibName:@"UpgradesView" bundle:nil];
upgradesViewController.title = @"Upgrades";
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:upgradesViewController];
navController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
navController.navigationBar.barStyle = UIBarStyleBlack;
UIBarButtonItem* doneButton = [[UIBarButtonItem alloc] initWithTitle:@"Show" style:UIBarButtonItemStylePlain target: self action:nil];
navController.navigationItem.rightBarButtonItem = doneButton;
[self presentModalViewController:navController animated:YES];
[navController release];
[upgradesViewController release];
example
i draw UIImageView inside UIView with a.png
then i rotate my device
is it possible to draw another picture to replace my current picture(a.png) ?
In my application I need to keep track of a list of objects that are being displayed. Right now I have an NSArray with all of the NSManagedObjects. Would I be better off to store the ObjectIDs and then only request the object when I need it?
I am mainly concerned about memory at this point.
I have problem with rotating and moving image (UIView).
If I use this for rotate:
[UIView beginAnimations: @"rotate" contex: nil];
[UIView setAnimationDuration: 1];
[UIView setAnimationBeginsFromCurrentState: YES];
[UIView setAnimationCurve: UIViewAnimationCurveLinear];
spaceShip.transform = CGAffineTransformMakeRotation (angle); // spaceShip is the UIView
[UIView commitAnimations];
And this to move:
[UIView beginAnimations: @"move" contex: nil];
[UIView setAnimationDuration: 1];
[UIView setAnimationBeginsFromCurrentState: YES];
[UIView setAnimationCurve: UIViewAnimationCurveLinear];
spaceShip.center = destanation // destanation is a point where user tap
[UIView commitAnimations];
It's working well one at a time. But together this two animations don't work. Space Ship is rotating, but does not move in direction.
Where my mistake?
P.S. Early I have specify anchor point (0.5, 0.5). But when I rotate image it coordinates is changing.
This seems like a simple thing, but can't get it to work.
I pass a variable into a UIViewController thourgh a standard property:
[aViewController setProposedDate:proposedWorkLog.entryDate];
which is retained by the controller, and possible changed. I have verified that in the controller, the data is modified.
But, after it is popped off the stack and I look in the calling view, the data has not been updated. Is there a way to pass this variable and have it retain the new value, or a way to pass back a response from a closing view controller?
Thanks!
Usually when a tab based app is launched, automatically control goes to the 1st tab. Is there any way such that the 1st tab's view will be shown but without the 1st tab being selected?
Hi
I have a grouped table with two sections where I display text with different length and therefore cell height.
I have solved the problem with the different length/height with constrainedToSize in cellForRowAtIndexPath.
Now I want to add a section with one single row in which I want to show a picture.
How should I best implement that? (still a bit of a beginner with the Objective C)
I would guess that I would have to create an UIImageView and somehow link that to the cell, but my biggest concern is how do I do with the dequeueReusableCellWithIdentifier now that I will have two different type of cells?
Appreciate any advice that will help me save time from trial and error!
I am getting duplicates of my array, and wrongly displayed cells in this method:
Here I am initializing the array, and adding it to the tableView:
NSArray *sectionsArray = [NSArray arrayWithObjects: @"Location", @"Front Post", @"Front Fixing", @"Front Footplate", @"Rear Post", @"Read Fixing", @"Rear Footplate", @"Horizontal Bracing", @"Diagonal Bracing", @"Front Beam", @"Front Lock", @"Rear Beam", @"Rear Lock", @"Guard", @"Accessories", @"Comments", @"Off load ref", @"Loc Empty", @"Loc Affected", nil];
[_tableArray setObject:sectionsArray atIndexedSubscript:2];
[_tableView reloadData];
For some weird reason there are always the 4th object that is messed up, and is either duplicated, or do not have the views from IB. Here is the cellForRowAtIndexPath: method:
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell;
if (indexPath.section == 2) {
cell = [tableView dequeueReusableCellWithIdentifier:@"EntryCell"];
cell.tag = indexPath.row;
UILabel *label = (UILabel *)[cell viewWithTag:3];
[label setText:[[_tableArray objectAtIndex:2] objectAtIndex:indexPath.row]];
}
return cell;
}
I have logged the string [[_tableArray objectAtIndex:2] objectAtIndex:indexPath.row], and it logs the right string.
How can I get flash effect for images got from Camera?
After I got image from camera (it shows in UIImageView) and before saving it as a file I'd like to lighten (in some cases) image by pressing Flash button. Is it possible by using Core Graphics ??
I am trying to build an app which will compare the two images and gives the Matching Percentage.
I am taking two Images from The camera(Making use of UIImagePickerController) and saving it to the document directory.Then i fetch these images in a different view controller to get the face part, using CIDetector API and CIfacefeature API. The problem is It is not detecting the face at all through i am able to fetch the images properly. And if i store the same image in the main bundle it detects. I dnt know where the problem is. I have tried everything. May Be the problem is with the UIImage or may be the format in which image is getting saved in document directory or with the camera.
Please help. I will be grateful to you.
Thanks in Advance.