ObjC - Hiding the separator lines of a UITableView on iPhone - objective-c

I try to do this with following line:
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
and it works! on the simulator.. strangely when I run the app on the iPhone (3Gs) they show up again.
Any ideas why this could be happening?
(Also labels and images of my custom cells are displayed on wrong positions, maybe its the same problem)
There is absolutely no difference between the simulator and the device code (it's the same code that gets compiled).

It seems it was an Apple bug. I updated to iOS 4.0.1 (with XCode+SDK update as well of course) and now everything works just fine.

Related

iOS14 UICollectionView Not Displaying Properly

After upgrading to XCode12 and iOS14 I have an issue in one collection view which does not display as it did when compiling for iOS 13.6. The order of the cells is wrong and the spacing/dimensions are as well. Please see the picture (top, in the oval). In the iOS13.6 build, the cells were equally spaced, did not overlap, and were in a different order. This happens both on the simulator as well as on the actual device.
The code has not changed at all (still uses the delegates).
Does anyone have any clue?
Thanks

xcode view size smaller than iphone

That never happened before iOS 6.
Now, I create an "auto layout", and I realized that the size was different in xcode, because the image was large but was correct in photoshop. When creating the app in the simulator, I have this:
I kept finding weird. So checked the size of the iPhone 5 and moved, as I always did, then looked like this:
When creating the app in the simulator, looked like this:
I wonder what happened with Xcode? Someone went through this already?
Thank you
It looks like you are working with an XIB that was identified as for iPad. In the Attribute Inspector, what options are you given under size? An iPad XIB has these options in Attribute Inspector - Size:
If that is what you see, you may have to create a new XIB, and be sure to choose Device Family - iPhone.

Unknown Issue when trying to add core location

I'm working on an app where I have a subclass of a UIView that contains seven subviews with orientations arranged such that they form a 7-sided shape. Each of these subviews has additional subviews in front of them that are oriented the same way as the main view.
Fine so far. Then I tried adding some code to tap into core location services. I used the basic procedure outlined at this tutorial. Using the code as it is presented there, I successfully got the heading to display in the debugger window.
Next step was to tie it into my app. To make sure I was on the right track, I simply added this code:
float radianHeading = newHeading.trueHeading * M_PI / 180;
CGAffineTransform transformTrollCalendar = CGAffineTransformMakeRotation(radianHeading);
[self setTransform:transformTrollCalendar];
There are two issues. The first is that the view is not visibly rotated. I was prepared for that, because I probably have to trigger something to redraw the view. However, I get another problem that has me worried.
When I get a bunch of updates from the compass, the connection between my mac and my iPad gets lost, as evidenced by the stop button turning grey. Moments later, the iPad makes the sound that you get when you connect the cable to the Mac or power. Then I get the slider that you get when you first power up the iPad. I figure this means I'm doing something majorly wrong. However, the app still appears to be running on the iPad, and it is not generating any crash logs.
I resolved my own problem. Apparently, the problem was the result of my putting the code into the wrong method. I don't remember anymore which wrong method I placed the code into, but when I placed it in the correct method, it worked just fine.
I would have updated this sooner, when it was still fresh on my mind, but I've had a trip to Guatemala in the interim that has caused my memories of this problem to fade.

Switching into my app causes pasteboard to clear. iPad Paste button won't appear sometimes

I'm having a really strange issue with the Pasteboard, and I'm looking for suggestions:
When switching into my app to paste some text, the text in the pasteboard sometimes gets cleared, so when I try to paste there is nothing in the pasteboard anymore. Switching and pasting in other apps are fine, so something is unique about my app.
heres a video of the problem (simulator) and the weird work around i've found.
http://screencast.com/t/ID57TikvFOD
Example: if i am in mail, copy some text, and then double tap home and switch to my running app, the paste option almost never appears. When i go to my input box and press-and-hold, the Paste button never appears.
Oddly, this behavior is not consistent as it sometimes works. I'd guess about 20% of the time it works and 80% of the time the pasteboard is cleared. I thought it might be a memory warning clearing the pasteboard, so I watched my iPad with "activity monitor" in instruments and I dont see any memory warnings.
This is driving me nuts. I can repro the same inconsistency in my iOS 5 ipad, as well as 4.2 and 5.0 simulators. My customer is running 4.2 and the work-around i've found (double switching) doesn't work for him.
In my code, the only time i ever reference the pasteboard i'm just putting things in it. i never clear it.
- (IBAction)copyToClipboard:(id)sender {
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = currentCard.concept.chineseWord;
[self._delegate dismissPopover];
}
Any idea what might be going wrong?
AndreasZ's tip solved the problem for me. Flurry was buggy and was causing the pasteboard issue.

Can't find image while running on device, but can find it while running on simulator

I'm trying to load an UIImageView with an UIImage using [UIImage imageNamed:name]. The simulator works perfectly loading the image, but running the same code on an iPad terminates with an exception (because the UIImage ends up being nil). Why is this happening?
I added the images from XCode to 'Supporting Files/Images'.
Weird thing is that some files I added are being found ok, but these other images are not. The only difference between them is that I renamed the ones I cannot find from within XCode. I even tried removing and adding them back again, but no dice.
Case is not the issue, I already checked it.
This is on XCode 4.2 and iOS 5.
Any clues?
Thanks
Image names are case-sensitive on the device, but not on the simulator.
If your case is correct, reset the simulator.
http://www.jameskelso.com/post/9627437152/images-show-in-the-ios-simulator-but-not-on-a-device
Make sure that the images exist in the "Copy Bundle Resources" section of your target's Build Phases. Whatever you do, try cleaning your build folder first (option+shift+cmd+k). Good luck!