NSNotificationCenter - Observer Pattern: Ok, but in mobile apps? [closed] - ios

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Why using NSNotificationCenter(ios) in a mobile apps. I mean I dont have many UI controls to update on a View. Also if I need to pass down to the caller of a View I would just use a delegate.
It might be justifiable in a logical sense if I have many Views in a Navigation control, and I would like to have each view down the navigation to update something - it is in situations like this NSNotificationCenter gets into play?
Thanks
Regards

In the situations you mention, you probably shouldn't use notifications -- it really doesn't have anything to do with mobile apps, the same criteria would apply to desktop apps as well. Notifications are best used if you need multiple objects to listen for an event, or in some cases, where two view controllers are far apart in the overall scheme of controllers, it's difficult to have one view controller set itself as the delegate of the other.

Related

Is blocking of unwanted phone calls implementable on iOS? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to drop a particular call if caller number belongs to some 'black-list'.
Is there any such possibility to do this programmatically on iOS (iPhones and iPads)?
From my understanding, such program must be running all the time like system service but I've never seen such apps. If no, then I could run app by myself and put it in background, but will the app from background be able to do this, and finally are there ant methods in API for performing this?
There's no public APIs for achieving anything like that.
Moreover this is a functionality that Apple will embed in iOS7, as per the last WWDC conference.

How can I update/add unlockables into my app without an update? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I need to add unlockables to my application, but the problem is that I don't want to have to send out an update every time that I want to add something new. I have read a bit about servers and JSON and XML. I just wanted to check to see if anybody else had a better idea?
If you are talking about something like a logo change then, short of an app update, the only option you have is getting it from an outside source such as a server transmission. But now you are talking about in-app purchases which, if you have not already, should read up on.
https://developer.apple.com/in-app-purchase/In-App-Purchase-Guidelines.pdf
Server based image and/or text transmissions are easily done and if I understand your last comment correctly, these updates would not be very frequent anyway.

How to add detail views to table view? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I hope someone can help me!
So I am building a app and I need to have 10 pages.
I found a way to order them in a way that suits the purpose.
I am using the template of this tutorial:
http://www.scienceathand.com/idevblogaday/adventures-in-uisplitviewcontroller-2/
The sample code is on github:
https://github.com/toddwbates/MultipleMasterDetailViews
So I have a split view, with the master view split in 2 by a tab bar. The master view contains a table. The only thing I need to know is how I can add 4 detail view pages to the Master 1 table, and 6 detail view pages to the master2 table, working and navigating well. So I can edit the pages individual and easy navigate to them.
The orientation of the app is: Landscape.
If you need more information, look at the tutorial, sample code or ask me the things you need to know to help me.
I would recommend that you read up on the basics of UIViewController design and implementation. Here are a few links to get you started:
UIViewController Programming Guide:
http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/AboutViewControllers/AboutViewControllers.html
Then when you've got a handle on that, check out the UISplitViewController documentation:
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UISplitViewController_class/Reference/Reference.html#//apple_ref/occ/cl/UISplitViewController
You could also refine your question by providing some examples of what you have tried that have not worked. This way the community would have a better idea of what you're trying to do.

Can I get by by without ever using KVO? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Strange grammar, but I want to ask if there are cases where if I don't KVO (Key Value Observation), the app just can't do certain things/features?
Thanks
Key Value Observing offers functionality and behaviors that are unique and certainly useful to a developer, in same cases offering a glimpse at values that are otherwise opaque.
For example, if you want to know the precise duration of an animation in Cocoa that is otherwise a black-box (for example, the keyboard disclosure animation duration), KVO is the only way I know of that you could establish that.
Beyond that, it's a useful pattern for programming applications that involve data (go figure). As such, it is yet another tool in a developer's toolkit.
Can you get by without it? Sure. There are many tools you can get by without, and this one takes a little bit of effort to wrap your head around initially. But should you make a point of avoiding it? No, I don't think so - why would you?
You nearly never need KVO.
Only when you need some special things, or want to circumvent Apple sw design.
And for that few cases, you will find demo code, so dont worry about KVO much.

Hide/visible app mode in iphone [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
1.We have opened app.
2.Then we hide it.
3.Then we repair it .
4.And after that action i need to update page.
how can i realize it?
There are two possibilities for this:
1) When reactivated, the method applicationDidBecomeActive: in your application delegate will be called. Note that this will also be called when the app is being started for the first time.
2) An UIApplicationDidBecomeActiveNotification is being posted to the notification center. Objects (views) that need to react to that may register for that notification. I think this would probably the way to go for your case: register for this notification in the view that needs to be reloaded. Registering for notifications is handled in Notification Programming Topics - Registering for Notifications

Resources