Posts

Post not yet marked as solved
0 Replies
203 Views
While I'm adapting iOS app to be able to run on Apple Silicon, I found how the app running on Mac responds to its Life-Cycle Events seems different from how it does on iOS. For instance, (void)applicationDidBecomeActive:(UIApplication *)application; seems never called on Mac. Is there anywhere to know more about this topic?
Posted Last updated
.
Post not yet marked as solved
2 Replies
728 Views
In Xcode 12, when I use (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section this method is not called for section '0' The other UITableView protocol methods I'm using are called on section '0' properly. Strangely, only this one method among I'm using. I don't know when this started. Since I noticed the hight of the top cell in the TableView appears short, I was trying to fix it, then found this issue. I checked our app's store version, which was built with Xcode 11 and the hight of the top cell appears properly. So, this must be new... Anything changed? Am I missing something?
Posted Last updated
.
Post not yet marked as solved
2 Replies
325 Views
In my app, I need to show some choices to the user to select, wait for the response, then handle it accordingly. I know UIAlertController with UIAlertAction can do this and I'm using it mostly, but I have some cases they don’t fit and I must handle manually. To achieve this, I’m using: CFRunLoopRef currentRunLoop; ~ ~ ~ ~ ~  currentRunLoop = CFRunLoopGetCurrent(); CFRunLoopRun();  Wait for the user response here, then, when the selection is made, CFRunLoopStop(currentRunLoop); will be executed within its call back to exit CFRunLoop() to do further handlings written after it. Now, this has been working just fine on iPhone, iPad (and those simulators) on different generations, but when I run this on MyMac (designed for iPad), it just keeps going without stopping at CFRunLoopRun(). I assume this is supposed to work on any platform under “Universal” concept….  Or is there anything I’m missing or misunderstanding? 
Posted Last updated
.
Post not yet marked as solved
2 Replies
2.6k Views
In order to layout some views in my app, I have: CGRect bounds = [UIScreen mainScreen].bounds; CGFloat currentCenter = bounds.size.width/2;  CGFloat currentHeight = bounds.size.height;  Now, when I run this on iPhone, iPad (and those simulators) on different generations, those values work as expected, but when I run this on "MyMac (designed for iPad)," it’s not. I assume this is supposed to work on any platform under “Universal” concept…. Or is there anything I’m missing to make it work on MyMac?  By the way, I found the values are vary depends on the platform.
Posted Last updated
.