Monday, January 10, 2011

AVCaptureConnection orientation

A lenyeg, hogy az AVCaptureConnection-on kell beallitani a videoOrientation-t es nem az AVCaptureSession-on vagy az AVCaptureDevice-on.

Valahogy igy:
for(int i = 0; i < [[captureOutput connections] count]; i++) {
AVCaptureConnection *captureConnection = [[captureOutput connections] objectAtIndex:i];
if([captureConnection isVideoOrientationSupported]) {
[captureConnection setVideoOrientation:[[UIDevice currentDevice] orientation]];
}
}

Fontos viszont, hogy AVCaptureVideoDataOutput connection-jan nem lehet videoOrientation-t (es videoMirrored-et) allitani.

Monday, January 3, 2011

Cocoa Samurai: Objective-C Memory Management & Garbage Collection

Itt van.

Unable to load symbols for... DeviceSupport

Itt talaltam meg a megoldast.
Az volt a baj, hogy /Developer/Platforms/iPhoneOS.platform/DeviceSupport-ban volt egy 4.2.1a is a 4.2.1 mellett. Mindkettot kitoroltem es az xcode ujrainditasa majd a device csatolas utan lehuzta maganak ami kell. Valoszinuleg korabban egy beta-val probalkozhattam ami bekavart.

Wednesday, December 8, 2010

popViewController landscape modban fentrol lefele

Az volt a baj, hogy csak a UINavigatonController-ben adott vissza a shouldAutorotateToInterfaceOrientation YES-t. Igy ugyan a pushViewController-rel megnyitott ViewControllerek is forogtak, de ha azokorol visszaleptem (popViewControllerAnimated) landscape modban, akkor nem rendesen jobbra csuszott ki a ViewController, hanem fentrol lefele.

Az a megoldas, hogy nem eleg a UINavigationControlleren megadni a shouldAutorotateToInterfaceOrientation-t, hanem a tobbi ViewCotrolleren is meg kell ezt tenni. (Legalabbis azokon, amikre vissza fougunk lepni popViewControllerAnimated segitsegevel.)

Monday, December 6, 2010

UITextView font allitasa Interface Builder-ben

A Text View attributes-ban nincs benne, de a cmd+T elohozza.

Thursday, November 4, 2010

portrait-landscape video mode

Innen:

Videos on iPhone are recorded on Quicktime format. The Quicktime format always record videos on landscape and insert metadata on the archive with the orientation information (portrait or landscape) on the moment that was recorded.

...the Transformation Matrix that Apple applies to the Quicktime on the video stream property auxMatrix.

class-dump

This is a command-line utility for examining the Objective-C runtime information stored in Mach-O files. It generates declarations for the classes, categories and protocols. This is the same information provided by using 'otool -ov', but presented as normal Objective-C declarations, so it is much more compact and readable.

SBFormattedPhoneNumber > rejection

Tobb helyen leirjak, hogy igy lehet megszerezni a telefonszamot, de ezt ugysem fogjak beengedni az App Store-ba:


CFShow([[NSUserDefaults standardUserDefaults] objectForKey:@"SBFormattedPhoneNumber"]);


Oliver Drobnik itt felsorol meg par dolgot, ami ugyan elerheto, de tiltott (UICoverFlowLayer, UIDevice setOrientation, UIAlertView addTextFieldWithValue, UIProgressHUD)

Wednesday, October 20, 2010

Brent Simmons: Demo code for playing a movie on iOS 4 using AVFoundation

NGMoviePlayer Brent Simmonstol.

SpeedLimit

SpeedLimit is a Leopard preference pane for limiting your network bandwidth to one of a couple different speeds — 768k DSL, Edge, 3G, and Dialup. This is really handy for testing your iPhone app under normal Edge network conditions in the iPhone Simulator.

Simulator forgatasnak lelassitasa

iPhone Simulator-ban Hardware/Simulate Hardware Keyboard bekapcsolasa majd 3-szor a Shift. Ezek utan lassabban fog forogni a simulator.

Thursday, October 14, 2010

Tab Bar + Action Sheet

Ha egy UITabBarController valamelyik View-jan akarunk egy UIActionSheet-et mutatni, akkor azt a TabBar-ra kell tenni es nem az eppen hasznalt View-ra, kulonben a TabBar-ra eso resze az Action Sheet-nek nek kapja meg a touch eventeket es igy a legalso gombnak (pedaul Cancel) csak a felso kicsi resze fogja erzekelni a nyomkodast.

Friday, September 10, 2010

Async kep betoltes UITableViewCell-be

Itt van az Apple peldakodja:
This sample demonstrates a multi-stage approach to loading and displaying a UITableView. It begins by loading the relevant text from an RSS feed so the table can load as quickly as possible, and then downloads the images for each row asynchronously so the UI is more responsive

vagy

Monday, August 23, 2010

Bottom Bar elrejtese amikor betoltunk egy uj View-t.

Ha egy navigation controller-ben van mondjuk alul egy Tab Bar es azt el szeretnenk rejteni egy View-n, akkor:

[myView setHidesBottomBarWhenPushed:YES];
[[self navigationController] pushViewController:myView animated:YES];

Wednesday, August 11, 2010

Josh Highland: Don't use NSLog anymore!

Azt irja, hogy nem engedik be az app store-ba azokat az appokat amikben van NSLog.

Helyette ezt javasolja:

add the following lines to the Prefix.pch file:

#define DEBUG_MODE
#ifdef DEBUG_MODE
#define DebugLog( s, ... ) NSLog( @"<%@:(%d)> %@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define DebugLog( s, ... )
#endif

In your code, replace “NSLog” with “DebugLog”. THATS IT!
DebugLog adds some new functionality to NSLog. It will now output the file name and line number of the Debug statement.
The best part of this is that its very easy to disable when its time to create a release build of your code. Simple comment out the “#define DEBUG_MODE” line im the “_Prefix.pch” file.

BOOL logolasa

NSLog(@"BOOL = %@\n", (boolVar ? @"YES" : @"NO"));


Monday, August 2, 2010

AVCaptureMovieFileOutput

Remelem nem baj, ha ezt ide bemasolom:

Thursday, July 29, 2010

UIApplicationExitsOnSuspend

Ha az app-unk ugysem csinal semmit suspend modban es idegesit, hogy nem lehet egyszeruen kiloni, akkor az info.plist-hez ezt kell hozzaadni: UIApplicationExitsOnSuspend

Wednesday, July 14, 2010

UISplitViewController MasterView mutatasa portrait modban

A SplitView portrait modban automatikusan elrejti a MasterView-t es csak a DetailView-t mutatja, ahogy itt le is irjak:
"When the device is in a landscape orientation, the split view shows both panes. However, in portrait orientations, the split view displays only the second pane, which grows to fill the available space."

Egy nem dokumentalt (private) api hivassal ezt ki lehet kapcsolni:
[splitViewController setHidesMasterViewInPortrait:NO];

Csak igy valoszinuleg nem veszi be az App Store.

Az iPad alkalmazasoknak portrait es landscape modban is mukodniuk kell

iPhone-nal ez nem volt eloiras, de itt mar igen:

New) An application’s interface should support all landscape and portrait orientations. This behavior differs slightly from the iPhone, where running in both portrait and landscape modes is not required. For more information, see “Designing for Multiple Orientations.”

Wednesday, May 26, 2010

OS 4.0 > 3.1.3

Downgrade-elni hivatalosan nem lehet, de ha megis kell akkor igy.

Monday, May 3, 2010

Mike Ash: Dealing with Retain Cycles

Itt van az egesz.

"Apple's memory management guidelines state that when two objects have a parent-child relationship, the parent should retain the child. If the child needs a reference back to the parent, that reference should be an unretained, weak reference. This allows the parent to be deallocated, which can then release its reference to the child, avoiding a cycle."

Saturday, May 1, 2010

Validate Build Product

3.2-ben azokat ellenorzi amiket az App Store Review Team is fog es ahogy Jeff Lamarche is mutatja a Build Options-be kell felvenni.